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>(); } }
private void Start() { RirisFSMManager = GameObject.FindGameObjectWithTag("Boss").GetComponentInParent <RirisFSMManager>(); bulletPool = BossEffects.Instance.bullet; }
void Start() { riris = RirisFSMManager.Instance; }
protected virtual void Awake() { _manager = GetComponent <RirisFSMManager>(); }
private void Start() { riris = GetComponentInParent <RirisFSMManager>(); }