示例#1
0
    // Use this for initialization
    void Start()
    {
        single = GameObject.FindGameObjectWithTag("Player").GetComponent <SinglePlayerScript>();

        //Dialogue();
        //SendSpeach();
    }
 void OnTriggerStay2D(Collider2D other)
 {
     if (other.tag == "Player")
     {
         player = other.GetComponent <SinglePlayerScript>();
     }
 }
 public void multiPLayerFind()
 {
     if (Application.loadedLevel == 2)
     {
         gas        = 50;
         projectile = GameObject.Find("Hands").GetComponent <Projectile>();
         player     = GameObject.FindGameObjectWithTag("Player").GetComponent <SinglePlayerScript>();
         camera     = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <FollowSingleP>();
         playStat   = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerStats>();
         inventory  = GameObject.Find("Inventory").GetComponent <Inventory>();
     }
 }
示例#4
0
 // Use this for initialization
 void Start()
 {
     Setup();
     run          = true;
     singlePlayer = GetComponent <SinglePlayerScript>();
 }