Ejemplo n.º 1
0
    void Awake()
    {
        float fmax = (float)MaxHealth;

        Health        = new HealthComponent(fmax);
        CurrentHealth = Health.CurrentHealth;

        HealthEffector = new HealthEffector(Health);
    }
Ejemplo n.º 2
0
        static void Main()
        {
            IInputReader consoleReader = new ConsoleReader();
            var consoleWriter = new ConsoleWriter
            {
                AutoFlush = true
            };

            IUnitContainer unitMatrix = new MatrixContainer(MatrixRows, MatrixCols);
            ICommandDispatcher commandDispatcher = new ExtendedCommandDispatcher(); //CommandDispatcher();
            IUnitEffector unitEffector = new HealthEffector(); // EmptyUnitEffector();

            var engine = new Engine(unitMatrix,
                consoleReader,
                consoleWriter,
                commandDispatcher,
                unitEffector);

            engine.Start();
        }
Ejemplo n.º 3
0
        static void Main()
        {
            IInputReader consoleReader = new ConsoleReader();
            var          consoleWriter = new ConsoleWriter
            {
                AutoFlush = true
            };

            IUnitContainer     unitMatrix        = new MatrixContainer(MatrixRows, MatrixCols);
            ICommandDispatcher commandDispatcher = new ExtendedCommandDispatcher(); //CommandDispatcher();
            IUnitEffector      unitEffector      = new HealthEffector();            // EmptyUnitEffector();

            var engine = new Engine(unitMatrix,
                                    consoleReader,
                                    consoleWriter,
                                    commandDispatcher,
                                    unitEffector);

            engine.Start();
        }