コード例 #1
0
        public void AssembleAnimation(UnitStateType state, UnitAsset asset)
        {
            m_asset         = asset;
            m_state         = state;
            m_pool          = m_asset.ObjectPoolAsset();
            m_deathFX       = m_asset.DeathFX();
            m_collisionFX   = m_asset.CollisionFX();
            m_camShakeEvent = m_asset.CamShakeEvent();
            m_motorSFX      = m_asset.MotorSFX();

            m_mesh = m_asset.AddMeshToUnit(transform);
        }
コード例 #2
0
        public void AssembleHealth(UnitStateType state, UnitAsset asset, UnitBuilder builder, UnitAnimation animation)
        {
            m_asset     = asset;
            m_state     = state;
            m_builder   = builder;
            m_animation = animation;

            m_isPlayer = m_asset.IsPlayer();
            m_pool     = m_asset.ObjectPoolAsset();
            m_faction  = m_asset.Faction();

            m_playerHealthChangeEvent = m_asset.UnitHealthChangeEvent();
            m_playerDeathEvent        = m_asset.UnitDeathEvent();
        }