예제 #1
0
// Use this for initialization
    void Start()
    {
        ((Player)entities[0]).SetPlayerOne(true);
        ((Player)entities[1]).SetPlayerOne(false);
        entities[0].SetHealthBar(p1HealthBar, p1HealthText);
        entities[1].SetHealthBar(p2HealthBar, p2HealthText);
        entities[1].SetSprite("Sprites/knight_512px");

        // **************** NEW CODE *******************************
        Task        ex = new Damage(10);
        List <Task> li = new List <Task> {
            ex
        };

        for (int i = 0; i < 6; i++)
        {
            List <float> means = new List <float> {
                9f + i / 6f,
                10f + i / 6f,
                11f + i / 6f
            };
            List <float> stdDev = new List <float> {
                2.5f + i / 20f,
                3.75f + i / 20f,
                1f + i / 20f
            };
            TaskBuilder        strike = new TaskBuilder(new Damage(0), means, stdDev);
            List <TaskBuilder> tasks  = new List <TaskBuilder> {
                strike
            };
            CardStateBuilder stateBuilder = new CardStateBuilder(new StrikeState(), tasks);
            CardPile.AddToAll(stateBuilder);
            AllCardStates.Add(stateBuilder);

            enemyBuilder = EnemyBuilder.GetEnemyBuilder();
        }
        // *********************************************************
    }