Jypeli  9
The simple game programming library
IGameObject.cs
Siirry tämän tiedoston dokumentaatioon.
1 using System;
2 using System.Collections.Generic;
3 //using Jypeli.GameObjects;
4 
5 namespace Jypeli
6 {
11  {
12  Layer Layer { get; }
13  IGameObject Parent { get; set; }
14  Brain Brain { get; set; }
15 
16  //SynchronousList<GameObject> Objects { get; }
17  int ObjectCount { get; }
18 
19  bool IsVisible { get; set; }
20  bool IsAddedToGame { get; }
21  bool IgnoresLighting { get; set; }
22 
23  TimeSpan CreationTime { get; }
24  TimeSpan Lifetime { get; }
25  TimeSpan MaximumLifetime { get; set; }
26 
27  Angle Angle { get; set; }
28 
29  Vector AbsolutePosition { get; set; }
30  Angle AbsoluteAngle { get; set; }
31  Vector UnitX { get; }
32  Vector UnitY { get; }
35 
36  Animation Animation { get; set; }
37  Image Image { get; set; }
38  Color Color { get; set; }
39 
40  Shape Shape { get; set; }
41  Vector TextureWrapSize { get; set; }
42  bool TextureFillsShape { get; set; }
43  bool RotateImage { get; set; }
44 
45  event Action AddedToGame;
46  event Action Removed;
47 
48  bool IsInside( Vector point );
49 
50  void Add( IGameObject childObject );
51  void Remove( IGameObject childObject );
52 
53  void Move( Vector movement );
54  void MoveTo( Vector location, double speed, Action doWhenArrived );
55  void StopMoveTo();
56 
57  IEnumerable<T> GetChildObjects<T>() where T : IGameObject;
58  IEnumerable<T> GetChildObjects<T>( Predicate<T> predicate ) where T : IGameObject;
59  }
60 
74  public interface IGameObjectInternal : IGameObject
75  {
76  new Layer Layer { get; set; }
77  List<Listener> AssociatedListeners { get; }
78 
79  new bool IsAddedToGame { get; set; }
80 
81  void OnAddedToGame();
82  void OnRemoved();
83  }
84 }
Jypeli.IGameObjectInternal.OnRemoved
void OnRemoved()
Jypeli.IGameObject.IsInside
bool IsInside(Vector point)
Jypeli.IGameObject.StopMoveTo
void StopMoveTo()
Jypeli.IGameObjectInternal.OnAddedToGame
void OnAddedToGame()
Jypeli.IGameObject.Remove
void Remove(IGameObject childObject)
Jypeli.IGameObject.AddedToGame
Action AddedToGame
Definition: IGameObject.cs:45
Jypeli.IGameObject.Removed
Action Removed
Definition: IGameObject.cs:46
Jypeli.IGameObject.GetChildObjects< T >
IEnumerable< T > GetChildObjects< T >()
Jypeli
Definition: Automobile.cs:5
Jypeli.IGameObject.TextureWrapSize
Vector TextureWrapSize
Definition: IGameObject.cs:41
Jypeli.IGameObject
Yhteinen rajapinta kaikille peliolioille.
Definition: IGameObject.cs:11
Jypeli.Shape
Kuvio.
Definition: Shapes.cs:47
Jypeli.IGameObject.IgnoresLighting
bool IgnoresLighting
Definition: IGameObject.cs:21
Jypeli.IGameObject.AbsolutePosition
Vector AbsolutePosition
Definition: IGameObject.cs:29
Jypeli.DimensionalRW
Olio jolla on reunat joita voi muuttaa.
Definition: Dimensional.cs:48
Jypeli.IGameObject.Add
void Add(IGameObject childObject)
Jypeli.PositionalRW
Olio jolla on paikka jota voi muuttaa.
Definition: Positional.cs:28
Jypeli.Brain
Aivoluokka peliolioille. Voidaan käyttää tekoälyn ja tilannekohtaisten toimintamallien luomiseen peli...
Definition: Brain.cs:41
Jypeli.Updatable
Rajapinta päivittyville olioille.
Definition: Updatable.cs:7
Jypeli.IGameObject.MoveTo
void MoveTo(Vector location, double speed, Action doWhenArrived)
Jypeli.IGameObject.Lifetime
TimeSpan Lifetime
Definition: IGameObject.cs:24
Jypeli.Layer
Kerros. Vastaa olioiden piirtämisestä.
Definition: Layer.cs:32
Jypeli.IGameObject.Move
void Move(Vector movement)
Jypeli.IGameObject.ObjectCount
int ObjectCount
Definition: IGameObject.cs:17
Jypeli.IGameObject.AbsoluteUnitX
Vector AbsoluteUnitX
Definition: IGameObject.cs:33
Jypeli.Tagged
Rajapinta olioille, joilla on Tag-ominaisuus.
Definition: Tagged.cs:7
Jypeli.IGameObject.UnitX
Vector UnitX
Definition: IGameObject.cs:31
Jypeli.IGameObject.AbsoluteUnitY
Vector AbsoluteUnitY
Definition: IGameObject.cs:34
Jypeli.Destroyable
Rajapinta olioille, jotka ovat tuhottavissa.
Definition: Destroyable.cs:9
Jypeli.Animation
Sarja kuvia, jotka vaihtuvat halutulla nopeudella. Yksi animaatio koostuu yhdestä tai useammasta kuva...
Definition: Animation.cs:62
Jypeli.IGameObject.IsAddedToGame
bool IsAddedToGame
Definition: IGameObject.cs:20
Jypeli.IGameObject.Parent
IGameObject Parent
Definition: IGameObject.cs:13
Jypeli.IGameObject.IsVisible
bool IsVisible
Definition: IGameObject.cs:19
Jypeli.Color
Väri.
Definition: Color.cs:13
Jypeli.IGameObject.AbsoluteAngle
Angle AbsoluteAngle
Definition: IGameObject.cs:30
Jypeli.Image
Kuva.
Definition: Image.cs:29
Jypeli.Vector
2D-vektori.
Definition: Vector.cs:59
System
Definition: CFFauxAttributes.cs:29
Jypeli.IGameObject.CreationTime
TimeSpan CreationTime
Definition: IGameObject.cs:23
Jypeli.IGameObject.UnitY
Vector UnitY
Definition: IGameObject.cs:32
Jypeli.IGameObject.RotateImage
bool RotateImage
Definition: IGameObject.cs:43
Jypeli.IGameObject.TextureFillsShape
bool TextureFillsShape
Definition: IGameObject.cs:42
Jypeli.IGameObjectInternal
Jypelin sisäiset metodit ja propertyt joihin käyttäjän ei tarvitse päästä käsiksi kuuluvat tähän luok...
Definition: IGameObject.cs:75
Jypeli.IGameObject.MaximumLifetime
TimeSpan MaximumLifetime
Definition: IGameObject.cs:25
Jypeli.Angle
Suuntakulma (rajoitettu -180 ja 180 asteen välille) asteina ja radiaaneina. Tietoja kulmasta: http://...
Definition: Angle.cs:40