|
@@ -11,13 +11,28 @@ namespace AtomicNETTest
|
|
|
Neutral
|
|
Neutral
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ public class Spinner : CSComponent
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+ [Inspector]
|
|
|
|
|
+ float speed = 1.0f;
|
|
|
|
|
+
|
|
|
|
|
+ public override void Update(float timeStep)
|
|
|
|
|
+ {
|
|
|
|
|
+ Node.Yaw(timeStep * speed * 75.0f);
|
|
|
|
|
+
|
|
|
|
|
+ Console.WriteLine("TICK! : {0}", speed);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public class MyComponent : CSComponent
|
|
public class MyComponent : CSComponent
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
public override void Update(float timeStep)
|
|
public override void Update(float timeStep)
|
|
|
{
|
|
{
|
|
|
- Node.Yaw(timeStep * 75);
|
|
|
|
|
- Console.WriteLine("TICK! : {0}", MySprite2DValue.Texture.Name);
|
|
|
|
|
|
|
+ //Node.Yaw(timeStep * 75);
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
[Inspector]
|
|
[Inspector]
|
|
@@ -44,9 +59,13 @@ namespace AtomicNETTest
|
|
|
[Inspector]
|
|
[Inspector]
|
|
|
public BehaviorState State = BehaviorState.Neutral;
|
|
public BehaviorState State = BehaviorState.Neutral;
|
|
|
|
|
|
|
|
- [Inspector("Sprites/star.png")]
|
|
|
|
|
|
|
+ [Inspector("Textures/chest.png")]
|
|
|
public Sprite2D MySprite2DValue;
|
|
public Sprite2D MySprite2DValue;
|
|
|
|
|
|
|
|
|
|
+ [Inspector(DefaultValue = "Textures/chest.png")]
|
|
|
|
|
+ public Sprite2D MyOtherSprite2DValue;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|