예제 #1
0
 void Start()
 {
     CreatePhase(startPhase);
     grounder     = GetComponent <Grounder>();
     viableAction = new List <ObjectAction>();
     viableHangs  = new List <HangObject>();
 }
예제 #2
0
 // 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;
 }
예제 #4
0
 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>();
 }
예제 #5
0
파일: Turret.cs 프로젝트: Zephan92/Cruisers
 private void OnTriggerStay(Collider other)
 {
     if (Target == null)
     {
         var enemy = other.GetComponent <Grounder>();
         if (enemy != null)
         {
             Target = enemy;
         }
     }
 }
예제 #6
0
파일: Turret.cs 프로젝트: Zephan92/Cruisers
    private void OnTriggerExit(Collider other)
    {
        var enemy = other.GetComponent <Grounder>();

        if (enemy != null)
        {
            enemiesWithinRange--;
            if (Target == enemy)
            {
                Target = null;
            }
        }
    }
예제 #7
0
파일: Turret.cs 프로젝트: Zephan92/Cruisers
    private void OnTriggerEnter(Collider other)
    {
        var enemy = other.GetComponent <Grounder>();

        if (enemy != null)
        {
            enemiesWithinRange++;
            if (Target == null)
            {
                Target = enemy;
            }
        }
    }
예제 #8
0
    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);
    }
예제 #9
0
 private void DrawFinalIKInspector(Grounder finalIK)
 {
     DrawInspector(finalIK);
 }