임시
This commit is contained in:
parent
e4fe8e78b4
commit
6c80f6bfee
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,6 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using BehaviorDesigner.Runtime.Tasks.Unity.UnityGameObject;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace BlueWater
|
namespace BlueWater
|
||||||
@ -12,6 +13,12 @@ namespace BlueWater
|
|||||||
public float speed = 50.0f;
|
public float speed = 50.0f;
|
||||||
protected float force = 0.0f;
|
protected float force = 0.0f;
|
||||||
public float force_add = 0.002f;
|
public float force_add = 0.002f;
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
private GameObject SmokeL;
|
||||||
|
[SerializeField]
|
||||||
|
private GameObject SmokeR;
|
||||||
|
|
||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
@ -26,9 +33,10 @@ namespace BlueWater
|
|||||||
|
|
||||||
if (Input.GetKey(KeyCode.UpArrow)|| Input.GetKey(KeyCode.W))
|
if (Input.GetKey(KeyCode.UpArrow)|| Input.GetKey(KeyCode.W))
|
||||||
{
|
{
|
||||||
|
SmokeL.gameObject.SetActive(true);
|
||||||
|
SmokeR.gameObject.SetActive(true);
|
||||||
force += force_add;
|
force += force_add;
|
||||||
if (force >= 1.0f) force = 1.0f;
|
if (force >= 1.0f) force = 1.0f;
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (Input.GetKey(KeyCode.DownArrow) || Input.GetKey(KeyCode.S))
|
else if (Input.GetKey(KeyCode.DownArrow) || Input.GetKey(KeyCode.S))
|
||||||
{
|
{
|
||||||
@ -45,7 +53,8 @@ namespace BlueWater
|
|||||||
// transform.Translate(0, 0, speed * time);
|
// transform.Translate(0, 0, speed * time);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{ SmokeL.gameObject.SetActive(false);
|
||||||
|
SmokeR.gameObject.SetActive(false);
|
||||||
if (force < 0.0f)force += force_add/2.0f;
|
if (force < 0.0f)force += force_add/2.0f;
|
||||||
else if(force > 0.0f)force -= force_add/2.0f;
|
else if(force > 0.0f)force -= force_add/2.0f;
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user