void Start() { CreatePhase(startPhase); grounder = GetComponent <Grounder>(); viableAction = new List <ObjectAction>(); viableHangs = new List <HangObject>(); }
// Use this for initialization void Awake() { if (grounder == null) { grounder = transform.parent.GetComponent <Grounder>(); } parentLastPos = transform.parent.transform.position; }
// Use this for initialization void Start() { if (grounder == null) { grounder = GetComponent <Grounder>(); } rbody = GetComponent <Rigidbody>(); rbody.freezeRotation = true; rbody.useGravity = false; }
void Start() { phaseQue = new Queue <Phases>(); CreatePhase(startPhase); grounder = GetComponent <Grounder>(); viableAction = new List <ObjectAction>(); viableHangs = new List <HangObject>(); joints = new List <Joint2D>(); activeAbilities = new List <SuperAbility>(); }
private void OnTriggerStay(Collider other) { if (Target == null) { var enemy = other.GetComponent <Grounder>(); if (enemy != null) { Target = enemy; } } }
private void OnTriggerExit(Collider other) { var enemy = other.GetComponent <Grounder>(); if (enemy != null) { enemiesWithinRange--; if (Target == enemy) { Target = null; } } }
private void OnTriggerEnter(Collider other) { var enemy = other.GetComponent <Grounder>(); if (enemy != null) { enemiesWithinRange++; if (Target == null) { Target = enemy; } } }
public override bool Enter() { firstLoopWait = true; bigBox = actionObject.transform.parent.gameObject; iks = player.GetComponent <IKController>(); handArea = actionObject.GetComponent <SpriteRenderer>(); PhaseController pc = player.GetComponent <PhaseController>(); joystick = pc.joystick; attrs = pc.attributes; grounder = pc.grounder; rb = player.GetComponent <Rigidbody2D>(); bigBoxRb = bigBox.GetComponent <Rigidbody2D>(); anim = player.GetComponent <Animator>(); distanceFromBox = (player.transform.localScale.x > 0) ? -distanceFromBox : distanceFromBox; player.transform.position = new Vector3(actionObject.transform.position.x + distanceFromBox, player.transform.position.y, 0); iks.leftArm.ik.transform.gameObject.SetActive(true); iks.rightArm.ik.transform.gameObject.SetActive(true); anim.SetBool("pulling", true); CreateJoint(); return(true); }
private void DrawFinalIKInspector(Grounder finalIK) { DrawInspector(finalIK); }