17 lines
316 B
C#
17 lines
316 B
C#
|
|
using System.Collections;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
public class WindForce : MonoBehaviour
|
||
|
|
{
|
||
|
|
public float WindF;
|
||
|
|
public bool IsWind;
|
||
|
|
void Start()
|
||
|
|
{
|
||
|
|
if (IsWind)
|
||
|
|
{
|
||
|
|
Physics2D.gravity = new Vector3(WindF, -9.81f);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|