public void Makeinstance()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
 private void Awake()
 {
     myrb     = GetComponent <Rigidbody2D>();
     myanim   = GetComponent <Animator>();
     gameplay = GameObject.Find("GameplayController").GetComponent <Gameplay_script>();
 }
Example #3
0
 void Awake()
 {
     gameplay = GameObject.Find("GameplayController").GetComponent <Gameplay_script>();
 }
 private Gameplay_script gameplay;// Use this for initialization
 void Start()
 {
     rb       = GetComponent <Rigidbody2D> ();
     gameplay = GameObject.Find("GameplayController").GetComponent <Gameplay_script>();
 }