Пример #1
0
    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);
    }
Пример #2
0
 public override void Start()
 {
     Shap = new BoxShap(new Fixed(2), new Fixed(0.3f));
     base.Start();
 }
Пример #3
0
 public override void Start()
 {
     base.Start();
     Shap = new BoxShap(new Fixed(1), new Fixed(1));
 }
Пример #4
0
 public override void Start()
 {
     Shap = new BoxShap(new FixedNumber(1), new FixedNumber(1));
 }