Skip to content
Snippets Groups Projects
Commit 15b7bed6 authored by william's avatar william
Browse files

gerar IA, scripts de skill funcionando corretamente pra ambos controllers

parent 2aec44f0
No related branches found
No related tags found
No related merge requests found
......@@ -509,6 +509,21 @@ Prefab:
propertyPath: playerTransform
value:
objectReference: {fileID: 459544900}
- target: {fileID: 114858567225476672, guid: d5874588dd97d984b9b9bf561a426efd,
type: 2}
propertyPath: speedModifier
value: 2
objectReference: {fileID: 0}
- target: {fileID: 114699161715107030, guid: d5874588dd97d984b9b9bf561a426efd,
type: 2}
propertyPath: speedModifier
value: 2
objectReference: {fileID: 0}
- target: {fileID: 114690619191408066, guid: d5874588dd97d984b9b9bf561a426efd,
type: 2}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: d5874588dd97d984b9b9bf561a426efd, type: 2}
m_IsPrefabParent: 0
......
......@@ -64,6 +64,11 @@ public abstract class Controller : MonoBehaviour
{
return inputs.steal;
}
public float getBlockInput()
{
return inputs.block;
}
public abstract void changeTurn();
......@@ -82,6 +87,7 @@ public class Inputs
public float horizontalMovement;
public float verticalMovement;
public float steal;
public float block;
public Inputs()
{
......@@ -91,5 +97,6 @@ public class Inputs
horizontalMovement = 0;
verticalMovement = 0;
steal = 0;
block = 0;
}
}
......@@ -10,6 +10,7 @@ public class OpponentController : Controller
void Start()
{
setup();
inputs = new Inputs();
currentHand = 1;
if (handChange != null)
......@@ -17,6 +18,22 @@ public class OpponentController : Controller
handChange(currentHand);
}
myTurn = false;
canMove = true;
canSkill = true;
changeTurn();
}
private void setup()
{
animatorController = GetComponent<Animator>();
}
private void Update()
{
/*
inputs.steal = UnityEngine.Random.Range(0, 2);
inputs.crossOver = UnityEngine.Random.Range(0, 2);
*/
}
public override void changeTurn()
......
......@@ -33,6 +33,7 @@ public class PlayerController : Controller
inputs.horizontalMovement = Input.GetAxisRaw(controlType.getHorizontalInput());
inputs.verticalMovement = Input.GetAxisRaw(controlType.getVerticalInput());
inputs.steal = Input.GetAxisRaw(controlType.getStealInput());
inputs.block = Input.GetAxisRaw(controlType.getBlockInput());
}
public override void changeTurn()
......
......@@ -101,6 +101,22 @@ InputManager:
type: 0
axis: 0
joyNum: 0
- serializedVersion: 3
m_Name: Block
descriptiveName:
descriptiveNegativeName:
negativeButton:
positiveButton: l
altNegativeButton:
altPositiveButton:
gravity: 1000
dead: 0.001
sensitivity: 1000
snap: 1
invert: 0
type: 0
axis: 0
joyNum: 0
- serializedVersion: 3
m_Name: Shot
descriptiveName:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment