protected override void Awake()
    {
        base.Awake();

        Instance = GetComponent <RirisFSMManager>();

        cc     = GetComponent <CharacterController>();
        stat   = GetComponent <RirisStat>();
        anim   = GetComponentInChildren <Animator>();
        sound  = GetComponent <RirisSound>();
        sound2 = GetComponent <MonsterSound>();

        for (int i = 0; i < MR.Length; i++)
        {
            materials.AddRange(MR[i].materials);
        }

        RirisState[] stateValues = (RirisState[])System.Enum.GetValues(typeof(RirisState));
        foreach (RirisState s in stateValues)
        {
            System.Type   FSMType = System.Type.GetType("Riris" + s.ToString());
            RirisFSMState state   = (RirisFSMState)GetComponent(FSMType);

            if (null == state)
            {
                state = (RirisFSMState)gameObject.AddComponent(FSMType);
            }

            states.Add(s, state);
            state.enabled = false;
        }
    }
 public void Start()
 {
     if (!isWeapon)
     {
         riris = GetComponentInParent <RirisFSMManager>();
     }
 }
Example #3
0
 private void Start()
 {
     RirisFSMManager = GameObject.FindGameObjectWithTag("Boss").GetComponentInParent <RirisFSMManager>();
     bulletPool      = BossEffects.Instance.bullet;
 }
Example #4
0
 void Start()
 {
     riris = RirisFSMManager.Instance;
 }
Example #5
0
 protected virtual void Awake()
 {
     _manager = GetComponent <RirisFSMManager>();
 }
 private void Start()
 {
     riris = GetComponentInParent <RirisFSMManager>();
 }