Beispiel #1
0
    void Awake()
    {
        instance = this;

        gameObject.GetComponent <AudioListener>().enabled = false;
        //Object.DontDestroyOnLoad(gameObject);
    }
Beispiel #2
0
 // Use this for initialization
 void Awake()
 {
     myAnim      = this.GetComponent <AnimatorControl>();
     camAnim     = Camera.main.GetComponent <Animator>();
     myMovement  = this.GetComponent <UnitMovement>();
     tCam        = this.GetComponentInChildren <ThirdCamera>();
     myUnitState = this.GetComponent <UnitState>();
 }
Beispiel #3
0
    // Start is called before the first frame update
    void Start()
    {
        p = ScriptableObject.CreateInstance <Player>();
        p.Init();

        tc        = ScriptableObject.CreateInstance <ThirdCamera>();
        tc.target = p.GetTransform();
        tc.Init();

        p.myCam = Camera.main;
    }