Ejemplo n.º 1
0
    public override void CloneData(StateTemplate _reference)
    {
        MoveAround controller = _reference as MoveAround;

        this.rotationSpeed = controller.GetRotationSpeed();
        this.minDistance   = controller.GetMinDistance();
    }
 // Use this for initialization
 void Start()
 {
     head           = GameObject.FindGameObjectWithTag("EnemyBoss").GetComponent <greenBossCollision>();
     playerScript   = GameObject.FindWithTag("Player").GetComponent <MoveAround>();
     enemiesAlive   = GameObject.FindGameObjectWithTag("Manager").GetComponent <roundsAndEnemyManager>();
     health         = GameObject.FindGameObjectWithTag("greenEnemyHealth").GetComponent <GreenBossHealth>();
     shuttleControl = GameObject.FindGameObjectWithTag("EnemyBoss").GetComponent <greenBossControl>();
 }
Ejemplo n.º 3
0
 public Transform blueBossTransform;         //current transform data of this enemy - DELETE THIS WHEN HAS REAL MODEL
 // Use this for initialization
 void Start()
 {
     playerScript = GameObject.FindWithTag("Player").GetComponent <MoveAround>();            //cache transform data for easy access/performance
     health       = GameObject.FindGameObjectWithTag("blueEnemyHealth").GetComponent <BlueBossHealth>();
     enemiesAlive = GameObject.FindGameObjectWithTag("Manager").GetComponent <roundsAndEnemyManager>();
     BLM          = GameObject.FindGameObjectWithTag("mainFloor").GetComponent <BonusLevelManager>();
     health.background.guiTexture.enabled = true;
     GO = GameObject.FindGameObjectWithTag("Manager").GetComponent <GameOver>();
     blueBossTransform = GameObject.FindGameObjectWithTag("BlueBoss").transform;
 }
Ejemplo n.º 4
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
     DontDestroyOnLoad(gameObject);
 }
Ejemplo n.º 5
0
    public Transform greenBossTransform;        //current transform data of this enemy - DELETE THIS WHEN HAS REAL MODEL

    // Use this for initialization
    void Start()
    {
        playerScript            = GameObject.FindWithTag("Player").GetComponent <MoveAround>(); //cache transform data for easy access/performance
        health                  = GameObject.FindGameObjectWithTag("greenEnemyHealth").GetComponent <GreenBossHealth>();
        enemiesAlive            = GameObject.FindGameObjectWithTag("Manager").GetComponent <roundsAndEnemyManager>();
        enemiesAlive.aliveCount = 1;
        BLM = GameObject.FindGameObjectWithTag("mainFloor").GetComponent <BonusLevelManager>();
        health.background.guiTexture.enabled = true;
        GO = GameObject.FindGameObjectWithTag("Manager").GetComponent <GameOver>();
        //shuttleControl = gameObject.GetComponent<greenBossControl>();
        greenBossTransform = GameObject.FindGameObjectWithTag("GreenBoss").transform;
    }
Ejemplo n.º 6
0
 private void Awake()
 {
     playerScript = GameObject.FindGameObjectWithTag("Player").GetComponent <MoveAround>();          //cache transform data for easy access/performance
     enemiesAlive = GameObject.FindGameObjectWithTag("Manager").GetComponent <roundsAndEnemyManager>();
 }
Ejemplo n.º 7
0
 // Use this for initialization
 public override void Init(StateTemplate _parent)
 {
     base.Init(_parent);
     this.state = (MoveAround)this.parent;
 }
Ejemplo n.º 8
0
 void Start()
 {
     parentData = transform.parent.GetComponent(typeof(MoveAround)) as MoveAround;
     StartCoroutine("FindTargetWithDelay", 0.2f);
 }
Ejemplo n.º 9
0
 void Start()
 {
     moveAround = gameObject.GetComponent <MoveAround>();
 }