Ejemplo n.º 1
0
    void Awake()
    {
        // Retrieve the weapon only once
        weapons = GetComponentsInChildren <WeaponScript>();

        // Retrieve scripts to disable when not spawn
        moveScript = GetComponent <MoveScript>();

        moveTowardScript = GetComponent <MoveTowardScript> ();

        coliderComponent = GetComponent <Collider2D>();

        rendererComponent = GetComponent <SpriteRenderer>();

        soldiermoveScript = GetComponent <SoldierMoveScript> ();
    }
Ejemplo n.º 2
0
 void Start()
 {
     floatingScript = this.gameObject.GetComponent <SoldierMoveScript> ();
     fallScript     = this.gameObject.GetComponent <MoveScript> ();
     startPos       = this.transform.position;
 }