Ejemplo n.º 1
0
        public override void Start()
        {
            if (this.Initialized)
            {
                return;
            }
            base.Start();
            this.XGCharacter = Core.Instance.XGCharacters[this.XGCharacterName];
            this.Direction   = ECameraDirection.North;

            _spriteComponent    = Entity.GetComponentInChildren <SpriteComponent>();
            _characterComponent = Entity.Get <CharacterComponent>();
            _animations         = new Dictionary <(EActionTypes, ECameraDirection), List <IndividualAnimation> >();

            _spriteComponent.SpriteProvider           = BuildSpriteSheet();
            _spriteComponent.SpriteType               = SpriteType.Sprite;
            _spriteComponent.IgnoreDepth              = false;
            _spriteComponent.Entity.Transform.Scale.Y = 2.5f;
            _characterComponent.FallSpeed             = 50f;
            _characterComponent.JumpSpeed             = 5f;
            _characterComponent.Gravity               = new Vector3(0, -12f, 0);
            _unmodifiedPosition = _spriteComponent.Entity.Transform.Position;
            _characterComponent.UpdatePhysicsTransformation();
        }