コード例 #1
0
    //======================================

    void Awake()
    {
        // Player Controller
        bluePlayerController = GetComponent <BluePlayerController>();

        // Sprite Animator
        otherAnimator = bluePlayerController.spriteObject.GetComponent <Animator>();
    }
コード例 #2
0
    //======================================

    // Start is called before the first frame update
    void Start()
    {
        // Player Controller
        bluePlayerController = GetComponent <BluePlayerController>();

        // Camera to Draw From
        mainCamera = FindObjectOfType <Camera>();
    }
コード例 #3
0
    ///

    void Awake() // INITIALIZE VARIABLES
    {
        bluePlayer = GameObject.FindGameObjectWithTag("Blue_Player").GetComponent <BluePlayerController>();

        blueGun = GameObject.FindGameObjectWithTag("Blue_Gun").GetComponent <BlueGunController>();

        instance = this.gameObject;

        warpColor = warpLight.color;
    }
コード例 #4
0
    // Start is called before the first frame update
    void Start() // Create Step
    {
        currentHealth = startingHealth;

        // Store Color to return to from Flash White
        rend        = GetComponent <Renderer>();
        storedColor = rend.material.GetColor("_Color");

        //  Store Self ID - used with KnockBack
        playerController = FindObjectOfType <BluePlayerController>();
    }
コード例 #5
0
    //======================================

    void OnEnable()
    {
        //Debug.Log("Running_State");

        // Player Controller
        bluePlayerController = GetComponent <BluePlayerController>();

        //Move Player
        myRigidbody = GetComponent <Rigidbody>();

        // Enable Firing
        GetComponent <BlueFiringPrimary>().enabled = true;
    }
コード例 #6
0
    //======================================

    // Start is called before the first frame update (Create Event?)
    void Start()
    {
        altFire = false;

        canShoot = true;

        // Player Controller
        bluePlayerController = GetComponent <BluePlayerController>();

        sfx_AudioSource = GetComponent <AudioSource>();

        // Audio Sources
    }
コード例 #7
0
    //======================================

    void OnEnable()
    {
        Debug.Log("DAMAGED_State");

        // Player Controller
        bluePlayerController = GetComponent <BluePlayerController>();

        // Disable Firing
        GetComponent <BlueFiringPrimary>().enabled = false;

        // Move when Knocked Back
        myRigidbody = GetComponent <Rigidbody>();
        mainCamera  = FindObjectOfType <Camera>();
    }
コード例 #8
0
ファイル: Blue_Idle.cs プロジェクト: jonathanfeudi/projectRGB
    //======================================

    void OnEnable()
    {
        //Debug.Log("Idle_State");

        // Player Controller
        bluePlayerController = GetComponent <BluePlayerController>();

        // Move Player
        myRigidbody = GetComponent <Rigidbody>();

        myRigidbody.velocity = Vector3.zero;    // Stop Movement

        // Enable Firing
        GetComponent <BlueFiringPrimary>().enabled = true;
    }
コード例 #9
0
    //======================================
    void OnEnable()
    {
        Debug.Log("DAMAGED_State");

        // Player Controller
        bluePlayerController = GetComponent <BluePlayerController>();

        // Disable Firing
        GetComponent <BlueFiringPrimary>().enabled = false;

        // Move when Knocked Back
        myRigidbody = GetComponent <Rigidbody>();
        mainCamera  = FindObjectOfType <Camera>();

        // Play DMG SFX
        AudioSource.PlayClipAtPoint(damagedSFX, transform.position);
    }
コード例 #10
0
    //======================================

    void OnEnable()
    {
        // Player Controller
        bluePlayerController = GetComponent <BluePlayerController>();

        bluePlayerController.canShoot = false;  // Disable Firing Script

        // Gun Controller
        blueGunController = GameObject.FindGameObjectWithTag("Blue_Gun").GetComponent <BlueGunController>();

        blueGunController.isFiringLaser = false;

        // Move Player
        myRigidbody = GetComponent <Rigidbody>();

        myRigidbody.velocity = Vector3.zero;    // Stop Movement

        // Disable Firing
        GetComponent <BlueFiringPrimary>().enabled = false;
    }
コード例 #11
0
ファイル: Blue_Roll.cs プロジェクト: jonathanfeudi/scriptdump
    private float counterToIdle = .25f;  //////// NEED TO MATCH

    //======================================
    void OnEnable()
    {
        Debug.Log("ROLL_State");

        // Player Controller
        bluePlayerController = GetComponent <BluePlayerController>();
        bluePlayerController.canBeDamaged = false;

        // Disable Collider (INVULNERABILITY)
        //GetComponent<CapsuleCollider>().enabled = false;
        Physics.IgnoreLayerCollision(9, 21);
        Physics.IgnoreLayerCollision(9, 20);

        // Disable Firing
        GetComponent <BlueFiringPrimary>().enabled = false;

        // Move when Knocked Back
        myRigidbody = GetComponent <Rigidbody>();

        // Play DMG SFX
        AudioSource.PlayClipAtPoint(blueRollSFX, transform.position);
    }
コード例 #12
0
    //======================================

    void OnEnable()
    {
        Debug.Log("WARP_State");

        // Player Controller
        bluePlayerController = GetComponent <BluePlayerController>();

        bluePlayerController.canShoot = false;  // Disable Firing Script

        // Gun Controller
        //blueGunController = GetComponent<BlueGunController>();  // NOT NEEDED AS IT IS DRAGGED INTO THE INSPECTOR

        blueGunController.isFiringLaser = false;

        // Move Player
        myRigidbody = GetComponent <Rigidbody>();

        myRigidbody.velocity = Vector3.zero;    // Stop Movement

        // Disable Firing
        GetComponent <BlueFiringPrimary>().enabled = false;
    }
コード例 #13
0
    ///

    void Awake() // INITIALIZE VARIABLES
    {
        blueGun = GameObject.FindGameObjectWithTag("Blue_Gun").GetComponent <BlueGunController>();

        bluePlayer = GameObject.FindGameObjectWithTag("Blue_Player").GetComponent <BluePlayerController>();
    }
コード例 #14
0
    void Start()
    {
        blueHealControl = FindObjectOfType <BluePlayerController>();

        image = GetComponent <Image>();
    }
コード例 #15
0
 // Start is called before the first frame update (Create Event?)
 void Start()
 {
     myRB      = GetComponent <Rigidbody>();
     thePlayer = FindObjectOfType <BluePlayerController>();
 }
コード例 #16
0
 // Start is called before the first frame update
 void Start()
 {
     // Player Controller
     bluePlayerController = GetComponent <BluePlayerController>();
 }
コード例 #17
0
    private void Awake()
    {
        bluePlayer = GameObject.FindGameObjectWithTag("Blue_Player").GetComponent <BluePlayerController>();

        emissionModule = particleEffect.emission;
    }