Example #1
0
 // Use this for initialization
 void Start()
 {
     gameManager = GameObject.Find ("GameManager").GetComponent<s_GameManager> ();
     End_A.SetActive(false);
     End_B.SetActive(false);
     End_C.SetActive(false);
 }
 //Awake is always called before any Start functions
 void Awake()
 {
     //Check if instance already exists
     if (instance == null) {
                     //if not, set instance to this
                     instance = this;
             }
     //If instance already exists and it's not this:
     else if (instance != this) {
                     //Then destroy this. Makes sure there is only one!
                     Destroy (gameObject);
             }
     //Sets this to not be destroyed when reloading scene
     DontDestroyOnLoad(gameObject);
 }
 void Start()
 {
     gameManager = GameObject.Find ("GameManager").GetComponent<s_GameManager> ();
 }
    // Use this for initialization
    void Start()
    {
        gameManager = GameObject.Find ("GameManager").GetComponent<s_GameManager> ();
        anim = this.GetComponent<Animator>();
        waypointIDX = 0;
        currState = AIState.LOOK;
        Vector3 temp = waypoints[waypointIDX].transform.position - transform.position;
        mAngle = Mathf.Atan2(-temp.x,temp.y)*Mathf.Rad2Deg;
        transform.eulerAngles=new Vector3(0,0,mAngle);

         //   transform.LookAt(waypoints[waypointIDX].transform.position,new Vector3(0,0,1));
    }
Example #5
0
    void Start()
    {
        gameManager = GameObject.Find ("GameManager").GetComponent<s_GameManager> ();

        // Level 1 - 3

        L1 = false;
        L2 = false;
        L3 = false;
        L4 = false;
        LvL3 = false;

        // Level 4
        L4_1 = false;
        L4_3 = false;
        L4_2 = false;

        L5_1 = false;
        L5_2 = false;
        L5_3 = false;
        L5_4 = false;
    }
 // Use this for initialization
 void Start()
 {
     gameManager = GameObject.Find ("GameManager").GetComponent<s_GameManager> ();
     One = false;
     Two = false;
 }