コード例 #1
0
    // Constructor - Assume that Boss and Player are at Starting Positions.
    public BlackBoard()
    {
        // Transforms
        BossTransform = null;
        PlyrTransform = null;

        // Health
        PlyrHP = 1.0f;
        BossHP = 1.0f;

        //Current Active Specialist
        ActSpec = ActionSpecialists.AttackSpec;
        PasSpec = PassiveSpecialists.DistanceSpec;

        //Boss Variables
        BossBhvr = BossBehavior.Agressive;

        // Distance Variables
        CurBossLoc = BossLocation.RightSide;
        PlyrLoc = PlayerLocation.LeftFromBoss;
        DestBossLoc = BossLocation.RightSide;
        PlyrDist = PlayerDistance.Far;
        isMovingToOtherSide = false;
        isAtSafeDistance = false;
        isPlyrLinedUp = false;

        // Projectile Variables
        AreBulletsNear = false;
        NumberBulletsNear = 0;
    }
コード例 #2
0
    // Implement the Selection process for the ActiveSpecialist
    void SelectActiveSpec()
    {
        if (ReadBlackBoard.isAtSafeDistance)
            CurActSpec = ActionSpecialists.AttackSpec;
        else
            CurActSpec = ActionSpecialists.MoveSpec;

        // Update Passive Specialist to BlackBoard
        BlkBrdMngr.WriteBlckBrd.ActSpec= CurActSpec;
    }