示例#1
0
    //Awake is used to initialize any variables or game state before the game starts.
    //Awake is called only once during the lifetime of the script instance.
    //Awake is called after all objects are initialized so you can safely speak to other objects or query them

    void Awake()
    {
        shooter = GameObject.Find("Player").GetComponent <ShooterCS>();
        gm      = GameObject.Find("GameManager").GetComponent <GameManagerCS>();
    }
示例#2
0
 void Awake()
 {
     shooter = GameObject.Find("Player").GetComponent<ShooterCS>();
     gm = GameObject.Find("GameManager").GetComponent<GameManagerCS>();
 }