public DefenceSM(NavMeshAgent ag, FiniStateMachine st, KitchenHelper hp, STATUS _status, stateType stateTYPE, Animator an) : base(ag, st, hp, _status, stateTYPE, an) { chasingDistance = status.getCurrentweapon.chasingdistance; attackingTime = status.getCurrentweapon.attackdelay; attackRange = status.getCurrentweapon.attackrange; attacktimer = attackingTime; }
public override void OnTriggerEnter(Collider other) { if (other.tag == StaticStrings.helper || other.tag == StaticStrings.player || other.tag == StaticStrings.tower) { rb = other.GetComponent <Rigidbody>(); enemyteam = other.GetComponent <ITeam>().getTeam(); if (enemyteam != tm) { IHealth h = other.GetComponent <IHealth>(); h.takeDamage(damage); EffectDirector.instance.playInPlace(transform.position, StaticStrings.tornado); if (rb == null) { return; } rb.AddForce(new Vector3(200, 800, 800)); Invoke("stop", 5); } else { FiniStateMachine SM = other.GetComponent <FiniStateMachine>(); if (SM) { SM.becomeInvincible(true); } } if (Soundmanager.instance == null) { return; } Soundmanager.instance.PlaySeByName(StaticStrings.wind); } }
public AIState(NavMeshAgent ag, FiniStateMachine st, KitchenHelper hp, STATUS _status, stateType stateTYPE, Animator an) { stateMachine = st; agent = ag; helper = hp; status = _status; stateType = stateTYPE; anim = an; }
private void ripristing() { if (objectToFreez != null) { objectToFreez.SetActive(true); } FiniStateMachine sm = objectToFreez.GetComponent <FiniStateMachine>(); if (sm != null) { sm.changeState(stateType.cake); } Destroy(this.gameObject); }
public AttackSM(NavMeshAgent ag, FiniStateMachine st, KitchenHelper hp, STATUS _status, stateType stateTYPE, Animator an) : base(ag, st, hp, _status, stateTYPE, an) { attackingTime = status.getCurrentweapon.attackdelay; attacktimer = attackingTime; }
public IdleSM(NavMeshAgent ag, FiniStateMachine st, KitchenHelper hp, STATUS _status, stateType stateTYPE, Animator an) : base(ag, st, hp, _status, stateTYPE, an) { }
public MakeCakeSM(NavMeshAgent ag, FiniStateMachine st, KitchenHelper hp, STATUS _status, stateType stateTYPE, Animator an) : base(ag, st, hp, _status, stateTYPE, an) { helper.onReciveMaterial += OnReciveMaterial; pettingrange = status.pettingrange; }