public void Use(BaseGameEntity target, Transform origin)
 {
     if (!System.Object.ReferenceEquals(null, CurWeapon) &&
         CurWeapon.IsReady())
     {
         CurWeapon.Use(target, origin);
     }
 }
 public void Use(Vector3 pos, Vector3 dir)
 {
     if (!System.Object.ReferenceEquals(null, CurWeapon) &&
         CurWeapon.IsReady())
     {
         CurWeapon.Use(pos, dir, Owner);
     }
 }
 public void Use(BaseGameEntity target)
 {
     if (!System.Object.ReferenceEquals(null, CurWeapon) &&
         CurWeapon.IsReady())
     {
         CurWeapon.Use(target, Owner);
     }
 }
Example #4
0
//role驱动行为树更合适,行为树仅提供决策,大部分逻辑仍在role中完成??
    public virtual void Update(float dt)
    {
        if (IsDead)
        {
            return;
        }

        StateUpdate();
        CurWeapon.Update(dt);
        BehaviorDesigner.Runtime.BehaviorManager.instance.Tick(Controller.tree);//决策放在逻辑帧的最后??
        //应该在Tick中call update,而不是update call tick??
    }
Example #5
0
 protected void InitWeapon()//
 {
     CurWeapon.Init();
     Status = PushState(0);
     //CurWeapon.GetCombos();
 }