예제 #1
0
    // Use this for initialization
    void Start()
    {
        tierOne      = true;
        mutantObject = this.gameObject;
        //wander = gameObject.GetComponent<EnemyStatePattern>();
        wander = mutantObject.GetComponent <EnemyStatePattern>();
        if (tierOne)
        {
            animation.GetComponent <Animator> ().enabled = true;
        }
        force    = 1000;
        coin     = GameObject.Find("catCoinPickUp");
        dropOnce = true;

        timerStart = false;
        hitEffect.SetActive(false);
        iceEffect.SetActive(false);

        if (this.gameObject.GetComponent <ChaseOnWake>() != null)
        {
            hasChaseOnWake = true;
        }
        else
        {
            hasChaseOnWake = false;
        }
    }
예제 #2
0
    // Use this for initialization
    void Start()
    {
        tierTwo    = true;
        timerStart = false;
        hitEffect.SetActive(false);

        enemyHealth = 100;
        if (immuneTypeInt == 1) //blue
        {
            enemyHealth = 600;
        }
        else if (immuneTypeInt == 2)  //red
        {
            enemyHealth = 480;
        }

        if (tierTwo)
        {
            animation.GetComponent <Animator> ().enabled = true;
        }

        coin = GameObject.Find("catCoinPickUp");

        mutantObject = this.gameObject;
        wander       = gameObject.GetComponent <EnemyStatePattern>();
        dropOnce     = true;

        // Debug.Log(wander);
        //look = gameObject.GetComponent<MutantStalker>();
        //controller = GetComponent<CharacterController> ();
    }
예제 #3
0
 void Awake()
 {
     // Setting up the references.
     player       = GameObject.Find("Player");
     playerHealth = player.GetComponent <PlayerHealth> ();
     cameraShake  = GameObject.Find("Main Camera").GetComponent <HealthShake> ();
     mutantObject = transform.parent.gameObject.GetComponent <EnemyStatePattern>();
 }
예제 #4
0
 private void Awake()
 {
     instance = this;
     //ADD NEW STATE PATTERNS HERE
     patrolState        = this.GetComponent <PatrolState>();
     attackState        = this.GetComponent <AttackState>();
     blockShurikenState = this.GetComponent <BlockShurikenState>();
     chaseState         = this.GetComponent <ChaseState>();
     blockSwordState    = this.GetComponent <BlockSwordState>();
     investigateState   = this.GetComponent <InvestigateState>();
     engardeState       = this.GetComponent <EngardeState>();
     enemyAudio         = GetComponent <AudioSource>();
 }
예제 #5
0
    void Start()
    {
        swordUI           = Singleton_Service.GetSingleton <SwordUI>();
        gm                = Singleton_Service.GetSingleton <GM>();
        hitMarkerPatterns = new List <string>();
        hitMarkers        = new List <GameObject>();

        hitMarkerPatterns.Add("diagonal");
        hitMarkerPatterns.Add("vertical");
        hitMarkerPatterns.Add("horizontal");
        hitMarkerPatterns.Add("cross");

        aiStates = GetComponent <EnemyStatePattern>();
        RandomizeHitMarkerPlacement();
    }
예제 #6
0
    // Use this for initialization
    void Start()
    {
        enemyHealth  = 100;
        tierTwo      = true;
        mutantObject = transform.parent.gameObject;
        wander       = gameObject.GetComponent <EnemyStatePattern>();

        if (tierTwo)
        {
            animation.GetComponent <Animator> ().enabled = true;
        }

        timerStart = false;
        hitEffect.SetActive(false);
        //em = hitParticle.emission;
        //em.enabled = false;



        immuneTypeInt = mutantObject.GetComponent <DamageHandler2>().immuneTypeInt;
        enemyHealth   = 100;
        if (immuneTypeInt == 1) //blue
        {
            enemyHealth = 600;
        }
        else if (immuneTypeInt == 2) //red
        {
            enemyHealth = 480;
        }

        coin     = GameObject.Find("catCoinPickUp");
        dropOnce = true;
        // Debug.Log(wander);
        //look = gameObject.GetComponent<MutantStalker>();
        //controller = GetComponent<CharacterController> ();
    }
예제 #7
0
 public EnemyState(EnemyStatePattern pattern)
 {
     this.pattern = pattern;
 }
예제 #8
0
 // Use this for initialization
 void Start()
 {
     enemy           = transform.parent.GetComponent <EnemyStatePattern>();
     myTransform     = transform.parent;
     playerCharacter = GameObject.Find("Player");
 }
예제 #9
0
 void Start()
 {
     enemy       = transform.parent.GetComponent <EnemyStatePattern>();
     enemy.chase = false;
 }
예제 #10
0
 public EnemyScaredState(EnemyStatePattern enemyStatePattern)
 {
     enemy    = enemyStatePattern;
     location = enemy.transform.position;
 }
예제 #11
0
 public EnemyFleeFrom(EnemyStatePattern enemyStatePattern)
 {
     enemy = enemyStatePattern;
 }
예제 #12
0
 public WanderZone(EnemyStatePattern statePatternEnemy)
 {
     enemy = statePatternEnemy;
     enemy.GetComponent <Rigidbody> ().freezeRotation = true;
     enemy.hitWall = false;
 }
예제 #13
0
 public StalkerZone(EnemyStatePattern statePatternEnemy)
 {
     enemy = statePatternEnemy;
 }
예제 #14
0
 public ChaseZone(EnemyStatePattern statePatternEnemy)
 {
     enemy       = statePatternEnemy;
     alwaysChase = false;
 }
예제 #15
0
 // Use this for initialization
 void Start()
 {
     enemy = transform.parent.GetComponent <EnemyStatePattern>();
 }
예제 #16
0
 // Use this for initialization
 void Start()
 {
     wander = gameObject.GetComponent <EnemyStatePattern>();
     //enemywander
     force = 1000;
 }
예제 #17
0
    /*public ChaseState(EnemyStatePattern enemyStatePattern)
     * {
     *  enemy = enemyStatePattern;
     * }*/

    void Start()
    {
        enemy = this.GetComponent <EnemyStatePattern>();
    }
예제 #18
0
 public EnemyIdle(EnemyStatePattern enemyStatePattern)
 {
     enemy = enemyStatePattern;
 }