コード例 #1
0
 // Use this for initialization
 void Start()
 {
     initialPosition = transform.localPosition;
     punchScript     = transform.parent.GetComponent <PunchScript> ();
     player          = transform.parent.parent.gameObject;
     if (player.transform.Find("PunchSprite") != null)
     {
         punchSprite = player.transform.Find("PunchSprite").gameObject;
     }
 }
コード例 #2
0
    private void UsePunchProperty(GameObject newRobot, bool isImposter, GameObject selectedSphere)
    {
        PunchScript script = newRobot.AddComponent <PunchScript> ();

        script.arCamera            = arCamera;
        script.isImposter          = isImposter;
        script.resultText          = resultText;
        script.gestureButtonScript = holdButton.GetComponent <GestureButton> ();
        script.selectedSphere      = selectedSphere;
    }
コード例 #3
0
    void Start()
    {
        rb          = GetComponent <Rigidbody2D> ();
        idle        = transform.Find("Idle").gameObject;
        punch       = transform.Find("Punch").gameObject;
        punchScript = punch.GetComponent <PunchScript> ();
        audioSource = GetComponent <AudioSource> ();

        if (GameObject.FindGameObjectsWithTag("Player").Length == 2)
        {
            foreach (GameObject fighter in GameObject.FindGameObjectsWithTag("Player"))
            {
                if (fighter.GetComponent <PlayerControls> ().fighterNumber != fighterNumber)
                {
                    enemy = fighter;
                }
            }
        }

        life       = initialLife;
        isGrounded = false;
    }
コード例 #4
0
    // Start is called before the first frame update
    void Start()
    {
        //punchScript = GetComponent<PunchScript>();

        PunchScript otherPunchScript = GameObject.FindGameObjectWithTag("Enemy").GetComponent <PunchScript>();

        staminaRecharge  = (thisPunchScript.thisAtributes.Resistance);
        staminaRecharge /= 200;
        staminaRecharge += 0.075f;

        stunRecharge  = (thisPunchScript.thisAtributes.Resistance);
        stunRecharge /= 300;
        stunRecharge += 0.05f;

        maxHP = 100 + (thisPunchScript.thisAtributes.Resistance * 10);
        //currentHp = maxHP;

        maxStamina = 50 + (thisPunchScript.thisAtributes.Resistance * 10);
        //currentStamina = maxStamina;

        maxStun     = 100 + (thisPunchScript.thisAtributes.Armor * 5);
        currentStun = 0;
    }
コード例 #5
0
    // Start is called before the first frame update
    void Awake()
    {
        stamina             = GetComponent <IEstaminable>();
        adrenalina          = GetComponent <IAdrenalinable>();
        characterController = GetComponent <CharacterController>();
        startColor          = spriteRenderer.color;
        speed = normalSpeed;

        punch                = children.GetComponent <PunchScript>();
        punchFly             = children.GetComponent <PunchFly>();
        adrenalinaPunch      = children.GetComponent <AdrenalinaPunch>();
        aereoPunch           = children.GetComponent <AereoPunchScript>();
        adrenalinaAereoPunch = children.GetComponent <AdrenalinaAereoPunch>();

        punchScript        = punch.GetComponent <PunchScript>();
        moveScript         = moving.GetComponent <MoveScript>();
        runScript          = run.GetComponent <RunScript>();
        punchRunningScript = punchRunning.GetComponent <PunchRunning>();
        punchFlyScript     = punchFly.GetComponent <PunchFly>();

        adrenalinaRunScript = adrenalinaRun.GetComponent <AdrenalinaRun>();

        ChangeState(State.MOVING);
    }
コード例 #6
0
 void Start()
 {
     ps = GetComponent <PunchScript>();
 }
コード例 #7
0
ファイル: DodgeScript.cs プロジェクト: jerffesonj/Supapo
 // Start is called before the first frame update
 void Start()
 {
     punchScript = GetComponent <PunchScript>();
     //Input.gyro.updateInterval = 0.0167f;
 }