コード例 #1
0
        /// <summary>
        /// Subscribes to events and initializes other variables.
        /// </summary>
        public Entity()
        {
            Sounds = new SoundFxManager(this);

            // Subscribes to default collision handling.
            CollidedWithTileAbove   += OnCollisionWithTileAbove;
            CollidedWithTileBelow   += OnCollisionWithTileBelow;
            CollidedWithTileToLeft  += OnCollisionWithTileToLeft;
            CollidedWithTileToRight += OnCollisionWithTileToRight;
            CollidedWithTerrain     += OnCollisionWithTerrain;

            RespawnPos = new Vector2(CollRectangle.X, CollRectangle.Y);
        }
コード例 #2
0
 void Awake()
 {
     instance = this;
 }
コード例 #3
0
ファイル: SoundFxManager.cs プロジェクト: Chefty/Enable
 private void Awake()
 {
     Instance = this;
 }
コード例 #4
0
ファイル: SoundFxManager.cs プロジェクト: roylisto/akik-crush
 void Awake()
 {
     instance = this;
 }