public override void OnStart(CrowdControl man) { base.OnStart(man); man.spineAnimController.SetAnimation("feet_push", SpineAnimationControl.CLEAR_NOT_FACIAL); man.spineAnimController.SetAnimation("push"); }
protected override void EnterFunc(Collider other) { hasTag = false; ccArray = other.GetComponents <CrowdControl>(); foreach (CrowdControl c in ccArray) { if (string.Equals(c.Tag, Tag)) { hasTag = true; break; } } if (hasTag) { cc.currentTime = 0f; } else { cc = other.gameObject.AddComponent <CrowdControl>(); cc.Tag = Tag; cc.movespdMultiplier = movespeedMultiplier; cc.jumpspdMultiplier = jumpspeedMultiplier; cc.durationTime = durationTime; } if (isDestroyable) { Destroy(this.gameObject); } }
public override void OnStart(CrowdControl man) { base.OnStart(man); man.spineAnimController.SetAnimation("walk_normal", SpineAnimationControl.CLEAR_NOT_FACIAL); man.spineAnimController.SetRandomAnimation("arm"); }
public override void OnStart(CrowdControl man) { base.OnStart(man); interval = Random.Range(3f, 8f); man.stateCoolingDown = interval; man.spineAnimController.SetAnimation("idle_wiggle", SpineAnimationControl.CLEAR_NOT_FACIAL); }
public override void OnStart(CrowdControl man) { base.OnStart(man); interval = 1f; man.stateCoolingDown = interval; man.spineAnimController.SetAnimation("land", SpineAnimationControl.CLEAR_NOT_FACIAL); }
public override void OnStart(CrowdControl man) { base.OnStart(man); if (man.simpleStateDict.ContainsKey(man.state)) { man.spineAnimController.SetAnimation(man.simpleStateDict[man.state], SpineAnimationControl.CLEAR_NOT_FACIAL); } }
public override bool isAffectedByCC(CrowdControl cc) { if (!complete) { return(false); } else { return(true); } }
public override void OnUpdate(CrowdControl man) { if (man.stateCoolingDown > 0) { man.stateCoolingDown -= Time.deltaTime; } else { OnInterval(man); } }
public override bool isAffectedByCC(CrowdControl cc) { if (cc.damageType == DamageType.Self) { return(true); } else { return(false); } }
// return false if the damage cannot target the player public bool IsAffectedByCC(CrowdControl cc) { foreach (State s in states) { if (!s.isAffectedByCC(cc)) { return(false); } } return(true); }
public override void OnStart(CrowdControl man) { base.OnStart(man); if (!man.IsBusy()) { man.spineAnimController.SetAnimation("cheers_face", SpineAnimationControl.CLEAR_ALL); man.spineAnimController.SetRandomAnimation("cheers", SpineAnimationControl.CLEAR_NOT_FACIAL, "cheers_face"); } else { man.spineAnimController.SetAnimation("cheers_face", SpineAnimationControl.CLEAR_FACIAL); } }
public override void OnStart(CrowdControl man) { base.OnStart(man); interval = 2f; man.stateCoolingDown = interval; if (man.gameObject.transform.localScale.x == -1) { man.spineAnimController.SetRandomAnimation("confuse_right", SpineAnimationControl.CLEAR_NOT_FACIAL); } else { man.spineAnimController.SetRandomAnimation("confuse_left", SpineAnimationControl.CLEAR_NOT_FACIAL); } }
protected void Awake() { health.current = health.max; energy.current = energy.max; crowd_control_effects = new CrowdControl(); is_alive = true; movement_lock = new Lock(); anti_gravity_lock = new Lock(); invincibility_lock = new Lock(); team = id.type; OnAwake(); }
public void Display() { GUILayout.BeginVertical("box"); { //ID = EditorGUILayout.IntField("ID", ID); damage = EditorGUILayout.IntField("Damage", damage); //connectDuration = EditorGUILayout.FloatField("Connect", connectDuration); CC = (CrowdControl)EditorGUILayout.EnumPopup("Control Effect", CC); if (CC > CrowdControl.Stagger) { CCForce = EditorGUILayout.FloatField("Control Force", CCForce); } hasFX = EditorGUILayout.Toggle("Spawn Special Effect", hasFX); if (hasFX) { gaoFX = EditorGUILayout.ObjectField("Special Effect", gaoFX, typeof(GameObject), false) as GameObject; } } GUILayout.EndVertical(); }
public void ApplyCrowdControl(CrowdControl cc, float duration) { bool affected = true; foreach (State s in states) { if (!s.isAffectedByCC(cc)) { affected = false; } } if (affected) { switch (cc.ccType) { case CrowdControlType.Root: Root(duration); break; case CrowdControlType.Stun: Stun(duration); break; } } }
public override void OnStart(CrowdControl man) { switch (man.state) { case CrowdState.INFLATE_HANDLE: man.spineAnimController.SetAnimation("inflate_pump", SpineAnimationControl.CLEAR_NOT_FACIAL); break; case CrowdState.INFLATE_ING: man.spineAnimController.SetAnimation("inflate_mouth_prepare", SpineAnimationControl.CLEAR_NOT_FACIAL); break; case CrowdState.INFLATE_COMPLETE: man.spineAnimController.SetAnimation("inflate_mouth_finish", SpineAnimationControl.CLEAR_NOT_FACIAL); break; case CrowdState.INFLATE_FLOAT: man.spineAnimController.SetAnimation("inflate_mouth_drift", SpineAnimationControl.CLEAR_NOT_FACIAL); break; default: break; } }
public virtual bool isAffectedByCC(CrowdControl cc) { return(true); }
public override void OnStart(CrowdControl man) { man.spineAnimController.SetAnimation("chain_drop", SpineAnimationControl.CLEAR_NOT_FACIAL); }
public override void OnUpdate(CrowdControl man) { }
public virtual void OnInterval(CrowdControl man) { man.stateCoolingDown = interval; }
public override void OnInterval(CrowdControl man) { base.OnInterval(man); man.SwitchState(man.lastState); }
public override void EnterFunc(Collider other) { /*사용자에게 상태이상을 거는 장애물*/ hasTag = false; ccArray = other.GetComponents <CrowdControl>(); foreach (CrowdControl c in ccArray) { /*현재 사용자에게 걸려있는 상태이상을 불러옴*/ if (string.Equals(c.Tag, Tag)) { cc = c; hasTag = true; break; } } if (hasTag) { /*만약 같은 상태이상을 또 걸 경우, 남은 시간을 초기화*/ cc.currentTime = 0f; } else { /*만약 걸리지 않은 상태이상일 경우, 상태이상을 건다*/ if (Tag != "") { cc = other.gameObject.AddComponent <CrowdControl>(); cc.Tag = Tag; cc.movespdMultiplier = movespeedMultiplier; cc.jumpspdMultiplier = jumpspeedMultiplier; cc.durationTime = durationTime; } } ///////////////////////////////////////////////// if (isDestroyable) { /*1회용 오브젝트인 경우, 상호작용 후 파괴*/ Destroy(this.gameObject); } if (isVanish && !nowVanishing) { /*사라졌다 생성되는 오브젝트 인 경우*/ nowVanishing = true; Invoke("VanishTile", timeVanishing); Invoke("RespawnTile", timeVanishing + timeRespawning); } if (isCheckRespawnPoint) { //리스폰 포인트인 오브젝트 인 경우 SetRespawnPoint(other); } if (isJumper) { /*Player면*/ if (CheckPlayer(other)) { /*온라인일때*/ if (other.GetComponent <PlayerController>() != null) { //other.GetComponent<PlayerController>().JumpCheck(); //other.GetComponent<PlayerController>().jumpSpeed = other.GetComponent<PlayerController>().JUMPSPD_ORIGIN * jumperMultiplier; } /*오프라인일때*/ else if (other.GetComponent <PlayerControllerOff>() != null) { other.GetComponent <PlayerControllerOff>().jumpSpeed = other.GetComponent <PlayerControllerOff>().JUMPSPD_ORIGIN *jumperMultiplier; other.GetComponent <PlayerControllerOff>().JumpCheck(); } } } if (isMoveWithPlayers) { /*플레이어와 함께 움직이는 오브젝트 인경우*/ SetPlayerParent(other, this.gameObject.transform); } }
public override void OnStart(CrowdControl man) { man.spineAnimController.SetAnimation("tickle", SpineAnimationControl.CLEAR_NOT_FACIAL); man.spineAnimController.SetAnimation("mouth_openonce", SpineAnimationControl.CLEAR_FACIAL); }
public override void OnInterval(CrowdControl man) { base.OnInterval(man); man.SwitchState(CrowdState.IDLE); }
public override void OnInterval(CrowdControl man) { base.OnInterval(man); man.spineAnimController.SetRandomAnimation("idle", SpineAnimationControl.CLEAR_NOT_FACIAL); }
public override void OnUpdate(CrowdControl man) { man.spineAnimController.SetProgress("feet_push", man.animationProgress); }