Exemplo n.º 1
0
 private void GetDependencies()
 {
     m_gameState    = Dependencies.GameState;
     m_inputManager = Dependencies.InputManager;
     m_voxelMap     = Dependencies.Map;
     m_factory      = Dependencies.VoxelFactory;
     m_gameView     = Dependencies.GameView;
     m_gameServer   = Dependencies.GameServer;
     m_gSettings    = Dependencies.Settings;
     m_progress     = Dependencies.Progress;
 }
Exemplo n.º 2
0
 /// <summary>
 /// if animate is false then m_factory.Release method should be called immediately
 /// </summary>
 /// <param name="animate"></param>
 public virtual void Kill()
 {
     if (m_voxelFactory == null)
     {
         m_voxelFactory = Dependencies.VoxelFactory;
         if (m_voxelFactory != null)
         {
             m_voxelFactory.Release(this);
         }
     }
     else
     {
         m_voxelFactory.Release(this);
     }
 }
Exemplo n.º 3
0
        public MatchUnitControllerBaseCli(IVoxelDataController dataController)
        {
            m_dataController = dataController;

            m_controlledVoxel = m_dataController.ControlledData.VoxelRef;

            OnSubscribe();

            m_dataController.ControlledData.VoxelRefSet   += OnVoxelRefSet;
            m_dataController.ControlledData.VoxelRefReset += OnVoxelRefReset;

            m_voxelMap     = Dependencies.Map;
            m_voxelFactory = Dependencies.VoxelFactory;
            m_game         = Dependencies.GameState;
        }
Exemplo n.º 4
0
        private void Start()
        {
            m_settings      = Dependencies.Settings;
            m_gameState     = Dependencies.GameState;
            m_voxelFactory  = Dependencies.VoxelFactory;
            m_effectFactory = Dependencies.EffectFactory;

            OnDebugModeChanged();
            m_settings.DebugModeChanged += OnDebugModeChanged;

            m_materialsCache = Dependencies.MaterialsCache;
            SetMaterials
            (
                m_materialsCache.GetPrimaryMaterial(m_owner),
                m_materialsCache.GetSecondaryMaterial(m_owner)
            );

            m_previousAltitude = Altitude;
            m_previousHeight   = Height;

            StartOverride();

            IsEnabled = false; //This is used to enable update method and programmatic animations
        }