improve column behaviour
This commit is contained in:
parent
6215653edf
commit
53d7b5c498
2 changed files with 8 additions and 5 deletions
|
@ -267,7 +267,7 @@ Transform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 684460085}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -4.02, y: 1, z: -7.01}
|
||||
m_LocalPosition: {x: -1.21, y: -2.11, z: -9.27}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
|
|
|
@ -4,16 +4,19 @@ namespace cylvester
|
|||
{
|
||||
public class ConstructionColumnBehaviour : MonoBehaviour
|
||||
{
|
||||
private Vector3 direction_;
|
||||
private int frameCount_;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
direction_ = new Vector3(Random.Range(-1.0f, 1.0f), 0f, Random.Range(-10.0f, 10.0f));
|
||||
transform.position = new Vector3(Random.Range(-5.0f, 5.0f), 0f, Random.Range(-5.0f, 5.0f));
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
frameCount_++;
|
||||
|
||||
if(frameCount_ == 60)
|
||||
Destroy(this.gameObject);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue