示例#1
0
文件: CrowdControl.cs 项目: huxii/OLU
        public override void OnStart(CrowdControl man)
        {
            base.OnStart(man);

            man.spineAnimController.SetAnimation("feet_push", SpineAnimationControl.CLEAR_NOT_FACIAL);
            man.spineAnimController.SetAnimation("push");
        }
示例#2
0
    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);
        }
    }
示例#3
0
文件: CrowdControl.cs 项目: huxii/OLU
        public override void OnStart(CrowdControl man)
        {
            base.OnStart(man);

            man.spineAnimController.SetAnimation("walk_normal", SpineAnimationControl.CLEAR_NOT_FACIAL);
            man.spineAnimController.SetRandomAnimation("arm");
        }
示例#4
0
文件: CrowdControl.cs 项目: huxii/OLU
        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);
        }
示例#5
0
文件: CrowdControl.cs 项目: huxii/OLU
        public override void OnStart(CrowdControl man)
        {
            base.OnStart(man);

            interval             = 1f;
            man.stateCoolingDown = interval;

            man.spineAnimController.SetAnimation("land", SpineAnimationControl.CLEAR_NOT_FACIAL);
        }
示例#6
0
文件: CrowdControl.cs 项目: huxii/OLU
        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);
     }
 }
示例#8
0
文件: CrowdControl.cs 项目: huxii/OLU
 public override void OnUpdate(CrowdControl man)
 {
     if (man.stateCoolingDown > 0)
     {
         man.stateCoolingDown -= Time.deltaTime;
     }
     else
     {
         OnInterval(man);
     }
 }
示例#9
0
 public override bool isAffectedByCC(CrowdControl cc)
 {
     if (cc.damageType == DamageType.Self)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
示例#10
0
        // 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);
        }
示例#11
0
文件: CrowdControl.cs 项目: huxii/OLU
        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);
            }
        }
示例#12
0
文件: CrowdControl.cs 项目: huxii/OLU
        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);
            }
        }
示例#13
0
    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();
    }
示例#14
0
        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();
        }
示例#15
0
        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;
                }
            }
        }
示例#16
0
文件: CrowdControl.cs 项目: huxii/OLU
        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;
            }
        }
示例#17
0
 public virtual bool isAffectedByCC(CrowdControl cc)
 {
     return(true);
 }
示例#18
0
文件: CrowdControl.cs 项目: huxii/OLU
 public override void OnStart(CrowdControl man)
 {
     man.spineAnimController.SetAnimation("chain_drop", SpineAnimationControl.CLEAR_NOT_FACIAL);
 }
示例#19
0
文件: CrowdControl.cs 项目: huxii/OLU
 public override void OnUpdate(CrowdControl man)
 {
 }
示例#20
0
文件: CrowdControl.cs 项目: huxii/OLU
 public virtual void OnInterval(CrowdControl man)
 {
     man.stateCoolingDown = interval;
 }
示例#21
0
文件: CrowdControl.cs 项目: huxii/OLU
        public override void OnInterval(CrowdControl man)
        {
            base.OnInterval(man);

            man.SwitchState(man.lastState);
        }
示例#22
0
    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);
        }
    }
示例#23
0
文件: CrowdControl.cs 项目: huxii/OLU
 public override void OnStart(CrowdControl man)
 {
     man.spineAnimController.SetAnimation("tickle", SpineAnimationControl.CLEAR_NOT_FACIAL);
     man.spineAnimController.SetAnimation("mouth_openonce", SpineAnimationControl.CLEAR_FACIAL);
 }
示例#24
0
文件: CrowdControl.cs 项目: huxii/OLU
        public override void OnInterval(CrowdControl man)
        {
            base.OnInterval(man);

            man.SwitchState(CrowdState.IDLE);
        }
示例#25
0
文件: CrowdControl.cs 项目: huxii/OLU
        public override void OnInterval(CrowdControl man)
        {
            base.OnInterval(man);

            man.spineAnimController.SetRandomAnimation("idle", SpineAnimationControl.CLEAR_NOT_FACIAL);
        }
示例#26
0
文件: CrowdControl.cs 项目: huxii/OLU
 public override void OnUpdate(CrowdControl man)
 {
     man.spineAnimController.SetProgress("feet_push", man.animationProgress);
 }