コード例 #1
0
ファイル: Chest.cs プロジェクト: endy/OgmoXNA
 public Chest(OgmoObject obj, Level level)
     : base(obj, level)
 {
     OgmoIntegerValue coins = obj.GetValue<OgmoIntegerValue>("coins");
     if (coins != null)
         this.Coins = coins.Value;
     this.Collision += new EventHandler<CollisionEventArgs>(Chest_Collision);
 }
コード例 #2
0
ファイル: Chest.cs プロジェクト: blockspacer/mbhxnazombietaxi
        public Chest(OgmoObject obj, Level level)
            : base(obj, level)
        {
            OgmoIntegerValue coins = obj.GetValue <OgmoIntegerValue>("coins");

            if (coins != null)
            {
                this.Coins = coins.Value;
            }
            this.Collision += new EventHandler <CollisionEventArgs>(Chest_Collision);
        }
コード例 #3
0
ファイル: MovingPlatform.cs プロジェクト: endy/OgmoXNA
 public MovingPlatform(OgmoObject obj, Level level)
     : base(obj, level)
 {
     nodes.AddRange(obj.Nodes);
     if (nodes.Count > 0)
     {
         direction = Vector2.Normalize(nodes[currentNode].Position - this.Position);
         nodes.Add(new OgmoNode(this.Position));
     }
     OgmoNumberValue speedValue = obj.GetValue<OgmoNumberValue>("speed");
     if (speedValue != null)
         speed = speedValue.Value;
 }
コード例 #4
0
        public MovingPlatform(OgmoObject obj, Level level)
            : base(obj, level)
        {
            nodes.AddRange(obj.Nodes);
            if (nodes.Count > 0)
            {
                direction = Vector2.Normalize(nodes[currentNode].Position - this.Position);
                nodes.Add(new OgmoNode(this.Position));
            }
            OgmoNumberValue speedValue = obj.GetValue <OgmoNumberValue>("speed");

            if (speedValue != null)
            {
                speed = speedValue.Value;
            }
        }