public SkillCheck Check(PlayerData player, Fixed width, Fixed height, Fixed forwardOffset, SkillNode node)
    {
        this.node   = node;
        this.player = player;
        var shap      = new BoxShap(height, width, player.transform.forward * forwardOffset + player.transform.Position, player.transform.Rotation);
        var otherList = player.client.physics.OverlapShap(shap);

        skill.others = otherList;

        if (otherList.Count > 0)
        {
            // UnityEngine.Debug.LogError("碰撞数 "+otherList.Count  );
            foreach (var other in otherList)
            {
                if (other is NetData)
                {
                    //        UnityEngine.Debug.LogError("碰撞 "+other.name+" "+other.GetType()   );
                }
            }
            node.SetTrigger(SkillTrigger.Check, this);
        }


        return(this);
    }
Example #2
0
    public override void OnPhysicsCheckEnter(NetData other)
    {
        if (other is HealthData && other != user)
        {
            //  UnityEngine.Debug.LogError("Enter触发Bullet!!!!");
            skill.others.Clear();
            skill.others.Add(other);
            skillNode.SetTrigger(SkillTrigger.Check, this);

            //(other as HealthData).GetHurt(new Fixed(10));
            if (!(other.isTrigger))
            {
                client.objectManager.Destory(this.view);
                UnityEngine.Debug.Log("destoy Bullet");
            }
        }
    }