Exemple #1
0
 public bool beAttacked(FBActor attacker, BallDetachType_Attacked type)
 {
     if (_setNextState(BeAttacked.instance, false))
     {
         m_stateInt   = (int)type;
         m_stateActor = attacker;
         m_currentState.enter(this);
         return(true);
     }
     return(false);
 }
Exemple #2
0
    //角色攻击
    void _processAttack(FBActor attacker, FBActor actor)
    {
        //todo bdt 个性化处理部分
        BallDetachType_Attacked bdt = BallDetachType_Attacked.Normal;

        if (!actor.isCtrlBall())
        {
            bdt = BallDetachType_Attacked.None;
        }

        actor.beAttacked(attacker, bdt);
    }
Exemple #3
0
    public FixVector3 getBallPosition(BallDetachType_Attacked type)
    {
        var ballPos = calculateRelativePosition(configuration.ballDetachPositionsAttacked[(int)type]);

        return(ballPos);
    }