コード例 #1
0
    void Update()
    {
        UICheck();
        if (uiActive)
        {
            spawnInk = FindObjectOfType <SpawnInk>();
        }

        Player      = GameObject.FindGameObjectWithTag("Player");
        groundCheck = GameObject.Find("Ground Check").transform;
        if (groundCheck == null)
        {
            Debug.Log("Ground Check not found");
        }
        isGrounded = Physics2D.Linecast(transform.position, groundCheck.position, layerGround);
        Aiming();
        ammoBehaviour.AmmoLimiter();
        if (Input.GetKeyDown(KeyCode.Space))
        {
            _jumped = true;
        }
        WallJumping();
        if (touchingSticky)
        {
            PlayerMovement(false);
        }
    }
コード例 #2
0
 // Update is called once per frame
 void Update()
 {
     playerBehaviour = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerBehaviour>();
     if (playerBehaviour.uiActive)
     {
         spawnInk = GameObject.Find("InkSpray").GetComponent <SpawnInk>();
     }
 }
コード例 #3
0
 // Use this for initialization
 void Start()
 {
     playerBehaviour = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerBehaviour>();
     if (playerBehaviour.uiActive)
     {
         spawnInk = GameObject.Find("InkSpray").GetComponent <SpawnInk>();
     }
     ammoBehaviour = FindObjectOfType <AmmoBehaviour>();
 }
コード例 #4
0
 // Use this for initialization
 void Start()
 {
     spawnInk  = GameObject.Find("InkSpray").GetComponent <SpawnInk>();
     spawnAmmo = GetComponent <SpawnAmmo>();
     if (spawnAmmo == null)
     {
         Debug.Log("Couldn't find spawn ammo script");
     }
     ChangeColour(type);
 }
コード例 #5
0
ファイル: AmmoBehaviour.cs プロジェクト: xCISACx/BOP
 // Use this for initialization
 void Start()
 {
     canReduceAmmo = true;
     gameManager   = FindObjectOfType <GameManager>();
     spawnInk      = FindObjectOfType <SpawnInk>();
 }