Example #1
0
 public PlayerCamMotor(ICamInput input, Transform player, Camera cam, UnitSettings settings)
 {
     this.input    = input;
     this.player   = player;
     this.cam      = cam;
     this.settings = settings;
 }
Example #2
0
    // add new attacksystem here

    private void Start()
    {
        playerInput = unitSettings.IsPlayer ? new PlayerController() as IUnitInput: new SlimeController();

        jumpSystem = new JumpSystem();
        motor      = new UnitMotor(playerInput, jumpSystem, GetComponent <Rigidbody>(), unitSettings);

        if (cam != null)
        {
            playerCamInput = new PlayerController();
            camMotor       = new PlayerCamMotor(playerCamInput, GetComponent <Transform>(), cam, unitSettings);
        }
    }