示例#1
0
文件: Cannon.cs 项目: sergeydus/Flood
 void Start()
 {
     levelManager = LevelManager.Instance;
     levelManager.items.Add(this);
     startcolor          = GetComponent <SpriteRenderer>().color;
     rb.constraints      = RigidbodyConstraints2D.FreezePosition | RigidbodyConstraints2D.FreezeRotation;
     dragIndicatorScript = DragIndicatorScript.Instance;
 }
示例#2
0
 // Start is called before the first frame update
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
         camera   = Camera.main;
     }
     else
     {
         Destroy(gameObject);
     }
 }
示例#3
0
 private void Awake()
 {
     _dragIndicatorScript = DragIndcator.GetComponent <DragIndicatorScript>();
 }
示例#4
0
 void Start()
 {
     gameManagerScript = GameObject.Find("GameManager").GetComponent <GameManager>();
     dragIndicator     = gameObject.GetComponent <DragIndicatorScript>();
     shotRing          = GameObject.Find("ShotRing");
 }