Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public partial class Enemy : IHasBehavior
- {
- BehaviorType behaviorType;
- private void CustomInitialize()
- {
- }
- private void CustomActivity()
- {
- Behave();
- }
- public void Behave()
- {
- BehaviorController.BehaviorSwitch(behaviorType, this);
- }
- private void CustomDestroy()
- {
- }
- private static void CustomLoadStaticContent(string contentManagerName)
- {
- }
- public void Setup(string name, BaseScreen screen)
- {
- foreach (EnemyData data in screen.EnemyDataFile)
- {
- if (data.Name == name)
- {
- // Setup Sprite/Animation
- CurrentAnimation = data.DefaultAnimation;
- sprite.ScaleX = data.Scale;
- sprite.ScaleY = data.Scale;
- // Behavior
- behaviorType = data.DefaultBehavior;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement