コード例 #1
0
        protected override void Interaction()
        {
            PlayerModel model = new PlayerModel();

            model.Speed = 1;
            PlayerAdapt.Fit(model);
            ServiceLocator.Get <DisplayBonuses>().Display(1);
            Good?.Invoke();
        }
コード例 #2
0
        public PlayerController(float speed, float health, float forceJump, GameObject player)
        {
            _model              = new PlayerModel();
            _model.Speed        = speed;
            _model.HealthPoints = health;
            _model.ForceJump    = forceJump;
            _rigidbody          = player.GetComponent <Rigidbody>();
            PlayerAdapt.Initialize(this);

            DisplayBonuses displayBonuses = new DisplayBonuses();

            ServiceLocator.Set(displayBonuses);
        }