diff --git a/MrBigsock/Assets/Code/PlayerController.cs b/MrBigsock/Assets/Code/PlayerController.cs index 300cedfbac1d53a86394b866607ddc3655d53b33..5bcbfb2818e1b58b5de146ad7671a868e29d9307 100644 --- a/MrBigsock/Assets/Code/PlayerController.cs +++ b/MrBigsock/Assets/Code/PlayerController.cs @@ -32,7 +32,8 @@ namespace BigSock { - protected IAttack _testAttack;// = new BasicProjectile1(); + protected IAttack _testAttack; + protected IAttack _testAttack2; public DateTime NextTimeCanAttack { get; private set; } = DateTime.Now; @@ -54,6 +55,7 @@ namespace BigSock { TryPickUpItem(ItemService.SINGLETON.Get(202)); var tmp = PrefabService.SINGLETON; _testAttack = (IAttack) AbilityService.SINGLETON.Get(101); + _testAttack2 = (IAttack) AbilityService.SINGLETON.Get(102); } @@ -95,8 +97,7 @@ namespace BigSock { } - private void Update() - { + private void Update() { if (Input.GetKeyDown(KeyCode.Space) || Input.GetMouseButton(0)) { // Manage attack cooldown. if(NextTimeCanAttack <= DateTime.Now) { @@ -110,6 +111,10 @@ namespace BigSock { } } + if(Input.GetKey(KeyCode.Z)) { + _testAttack2.Use(this, Camera.main.ScreenToWorldPoint(Input.mousePosition)); + } + //!! Code for testing the new item stuff. if(Input.GetKeyDown(KeyCode.Space)) { var item = ItemService.SINGLETON.GetRandom(); // new ItemRunningShoes();