public void Init(WitchSkillBase witchSkill)
    {
        _witch = witchSkill.Witch;
        _skill = witchSkill;
        foreach (WitchSkillArrowSubArrow a in GetComponentsInChildren <WitchSkillArrowSubArrow>())
        {
            if (a.name == "CenterArrow")
            {
                _centerArrow = a;
                continue;
            }

            _subArrows.Add(a);
        }

        WitchSkillArrowSubArrow[] obj = new WitchSkillArrowSubArrow[1];
        obj[0] = _centerArrow;
        _onObjs.Add(obj);
        obj    = new WitchSkillArrowSubArrow[2];
        obj[0] = _subArrows[1];
        obj[1] = _subArrows[2];
        _onObjs.Add(obj);
        obj    = new WitchSkillArrowSubArrow[2];
        obj[0] = _subArrows[0];
        obj[1] = _subArrows[3];
        _onObjs.Add(obj);
    }
示例#2
0
 public WitchSkillTeleport(WitchBoss witch, float distance) : base(witch)
 {
     _distance = distance;
     _obj      = GameObject.FindObjectOfType <WitchSkillTeleportObject>();
     _obj.gameObject.SetActive(false);
     _obj.Init(this);
 }
示例#3
0
 public WitchSkillA(WitchBoss witch, float distance) : base(witch)
 {
     m_distance = distance;
     m_obj      = GameObject.FindObjectOfType <WitchSkillAObject>();
     m_obj.gameObject.SetActive(false);
     m_obj.Init(witch);
 }
示例#4
0
 public void Init(WitchBoss witch)
 {
     m_witch = witch;
     foreach (WitchSkillAFire c in GetComponentsInChildren <WitchSkillAFire>())
     {
         m_fires.Add(c);
     }
 }
 // Use this for initialization
 private void Start()
 {
     spawnPoint = transform.FindChild(enemySpawnerPoint);
     logSpawnPoint(spawnPoint);
     rootEnemySpawner = gameObject.AddComponent <RootEnemy>();
     rootEnemySpawner.StartRootCoroutine(spawnPoint, enemiesToSpawn);
     witchBossInstance = rootEnemySpawner.getSecondChild();
 }
示例#6
0
 private void Awake()
 {
     _witch = GetComponent <WitchBoss>();
     _skills.Add(WitchSkill.A, new WitchSkillA(_witch, 400.0f));
     _skills.Add(WitchSkill.B, new WitchSkillArrow(_witch, 100.0f));
     _skills.Add(WitchSkill.C, new WitchSkillFoothold(_witch, 310.0f));
     _skills.Add(WitchSkill.Teleport, new WitchSkillTeleport(_witch, 10.0f));
     _randomSkills.Add(_skills[WitchSkill.A]);
     _randomSkills.Add(_skills[WitchSkill.B]);
     _skillIdxs = new int[_randomSkills.Count];
 }
示例#7
0
    public void Init(WitchSkillBase witchSkill)
    {
        _skill = witchSkill;
        _witch = witchSkill.Witch;

        foreach (WitchSkillFootholdFire a in GetComponentsInChildren <WitchSkillFootholdFire>())
        {
            a.gameObject.SetActive(false);
            _fires.Add(a);
        }
    }
    public void Init(WitchSkillBase skill)
    {
        _witch = skill.Witch;
        _skill = skill;
        _state = 0;
        _in    = transform.Find("In").gameObject;
        _out   = transform.Find("Out").gameObject;

        _in.SetActive(false);
        _out.SetActive(false);
    }
示例#9
0
    public void Init(WitchSkillBase witchSkill)
    {
        _witch = witchSkill.Witch;
        _skill = witchSkill;

        foreach (WitchSkillAFire c in GetComponentsInChildren <WitchSkillAFire>())
        {
            c.gameObject.SetActive(false);
            _fires.Add(c);
        }
    }
    void Start()
    {
        _index = 0;
        _witch = FindObjectOfType <WitchBoss>();

        foreach (WitchMonsterPhase phase in GetComponentsInChildren <WitchMonsterPhase>())
        {
            phase.gameObject.SetActive(false);
            _phase.Add(phase);
        }
    }
示例#11
0
    private void Awake()
    {
        _witch = GetComponent <WitchBoss>();
        WitchState[] states = Enum.GetValues(typeof(WitchState)) as WitchState[];
        foreach (WitchState state in states)
        {
            Type t = Type.GetType("WitchState" + state.ToString());
            WitchFSMStateBase s = GetComponent(t) as WitchFSMStateBase;
            if (s == null)
            {
                s = gameObject.AddComponent(t) as WitchFSMStateBase;
            }

            s.Witch   = _witch;
            s.enabled = false;
            _states.Add(state, s);
        }

        _states[WitchState.Groggy].enabled = true;
        _states[WitchState.Groggy].BeginState();
    }
示例#12
0
 private void Awake()
 {
     _witch    = FindObjectOfType <WitchBoss>();
     _collider = GetComponent <BoxCollider>();
 }
示例#13
0
 private void Awake()
 {
     _witch = transform.parent.GetComponent <WitchBoss>();
 }
示例#14
0
 public WitchSkillBase(WitchBoss witch)
 {
     m_witch = witch;
 }