예제 #1
0
    //Pre-Initialisation
    private void Awake()
    {
        //Double check that the tag Canister exists and then apply it to this object
        this.gameObject.tag = "Canister";

        system = GameObject.FindGameObjectWithTag("Base_System").GetComponent <Base_System>();


        //None by default as it will be changed later
        canisterType = FluxType.NONE;

        //Every canister starts with the charge of Zero || 1
        charge = 0;

        chargeSlider.gameObject.SetActive(false);
        //Start Colour
        sliderFill.color = Color.white;
        //
        onlyCheckOnce = false;

        canisterMaterial = GetComponent <Renderer>().materials[1];

        //canisterMaterial.SetColor("_canisterColour", Color.red);
        //canisterMaterial.SetFloat("_canisterLevel", 0.5f);
    }
예제 #2
0
 //Pre-Initialisation
 private void Awake()
 {
     //Get the system manager
     system = GameObject.FindGameObjectWithTag("Base_System").GetComponent <Base_System>();
     //Canister slot
     canisterSlot = currentSystem.SystemCanisterSlot.GetComponent <Canister_Slot>();
 }
예제 #3
0
    //Pre-Initialisation
    private void Awake()
    {
        //Grab the base system
        system = GameObject.FindGameObjectWithTag("Base_System").GetComponent <Base_System>();

        //Canister slot
        canisterSlot = currentSystem.SystemCanisterSlot.GetComponent <Canister_Slot>();

        evm = GameObject.FindGameObjectWithTag("Event_System_Manager").GetComponent <Event_System_Manager>();

        oxygenText.text = "Oxygen Systems Offline";
    }
예제 #4
0
    private void Start()
    {
        system = GameObject.FindGameObjectWithTag("Base_System").GetComponent <Base_System>();

        if (shieldVignette == null || damageVignette == null)
        {
            //Debug.Log("No image attached for the vignette flash");
        }

        shieldVignette.SetActive(false);
        damageVignette.SetActive(false);
    }
예제 #5
0
    //Main-Initialisation
    private void Start()
    {
        vignetteFlash = GameObject.FindGameObjectWithTag("vFlash").GetComponent <VignetteFlash>();
        //Get the rigidBody Component
        rigidBody            = GetComponent <Rigidbody>();
        rigidBody.useGravity = false;

        powerCore = GameObject.FindGameObjectWithTag("Base_System").GetComponent <Base_System>();

        targetLocationToHit = GameObject.FindGameObjectWithTag("ShipHitLocation");

        //FIND OBJECTS BY TAGS?
        event_Spawner = this.transform.parent.GetComponent <Event_Spawner>();

        switch (event_Spawner.currentEventDirection)
        {
        case Event_.EventDirection.TOP:
            shield_System = GameObject.Find("Shield - Top").transform.GetChild(0).GetComponent <Shield_System>();

            weapon_System = GameObject.FindGameObjectWithTag("wTOP").GetComponent <Weapon_System>();
            //weapon_System = GameObject.Find("Weapon - Top").transform.GetChild(0).GetComponent<Weapon_System>();
            //Debug.Log("Found the top Shield component");
            break;

        case Event_.EventDirection.LEFT:
            shield_System = GameObject.Find("Shield - Left").transform.GetChild(0).GetComponent <Shield_System>();

            weapon_System = GameObject.FindGameObjectWithTag("wLEFT").GetComponent <Weapon_System>();
            //weapon_System = GameObject.Find("Weapon - Left").transform.GetChild(0).GetComponent<Weapon_System>();
            //Debug.Log("Found the left Shield component");
            break;

        case Event_.EventDirection.RIGHT:
            shield_System = GameObject.Find("Shield - Right").transform.GetChild(0).GetComponent <Shield_System>();

            weapon_System = GameObject.FindGameObjectWithTag("wRIGHT").GetComponent <Weapon_System>();
            //weapon_System = GameObject.Find("Weapon - Right").transform.GetChild(0).GetComponent<Weapon_System>();
            //Debug.Log("Found the right Shield component");
            break;

        case Event_.EventDirection.BOTTOM:
            shield_System = GameObject.Find("Shield - Bottom").transform.GetChild(0).GetComponent <Shield_System>();

            weapon_System = GameObject.FindGameObjectWithTag("wBOTTOM").GetComponent <Weapon_System>();
            //weapon_System = GameObject.Find("Weapon - Bottom").transform.GetChild(0).GetComponent<Weapon_System>();
            //Debug.Log("Found the bottom Shield component");
            break;

        default:
            break;
        }
    }
예제 #6
0
    //Pre-Initialisation
    private void Awake()
    {
        //Reference to the ship core.
        //shipCore = GameObject.FindGameObjectWithTag("Power_Core").GetComponent<Power_Core>();
        //Get the system manager
        system = GameObject.FindGameObjectWithTag("Base_System").GetComponent <Base_System>();
        //Canister slot
        canisterSlot = currentSystem.SystemCanisterSlot.GetComponent <Canister_Slot>();
        //Grab the base usage amount
        usageAmount = system.Shield_UsageAmount;

        reductionAmount = system.Shield_ReductionAmount;
    }
예제 #7
0
    //Pre-Initialisation
    private void Awake()
    {
        //Get the system manager
        system = GameObject.FindGameObjectWithTag("Base_System").GetComponent <Base_System>();

        ////Raycast Line Check - Rework to a sphere cast.?
        //rayCast = new Ray(transform.position, Vector3.up);

        //Current systems ray casting object, first child of this
        system_Ray = this.transform.GetChild(0).GetComponent <System_RayCast>();

        //Default value for the currentCanister
        //currentCanister = null;
    }
예제 #8
0
    //Pre-Initialisation
    private void Awake()
    {
        //Get a reference to the base system
        system = GameObject.FindGameObjectWithTag("Base_System").GetComponent <Base_System>();

        //Canister slot
        canisterSlot = currentSystem.SystemCanisterSlot.GetComponent <Canister_Slot>();


        //currentSystem.WireSet.GetComponent<WireStatus>().status;

        //Material mat = currentSystem.WireSet.transform.GetChild(0).GetComponent<Renderer>().material;
        //mat.EnableKeyword("_EMISSION");
        //Debug.Log("Wire Set " + currentSystem.WireSet.transform.GetChild(0).name + " : " + mat.GetFloat("_EmissionColor"));
    }
예제 #9
0
    //Pre-Initialisation
    private void Awake()
    {
        //Get a reference to the base system
        system = GameObject.FindGameObjectWithTag("Base_System").GetComponent <Base_System>();

        //Default check
        canSpawnCansiter = false;

        evm = GameObject.FindGameObjectWithTag("Event_System_Manager").GetComponent <Event_System_Manager>();

        //get the max canister count
        if (system != null)
        {
            //Starting values
            canisterCountMax     = system.MaxCanisterCount;
            canisterCountOnScene = system.CurrentCanisterCount;
        }
    }
예제 #10
0
 // Use this for initialization
 void Start()
 {
     system = GameObject.FindGameObjectWithTag("Base_System").GetComponent <Base_System>();
     oxygen = GetComponent <Oxygen_System>();
 }
예제 #11
0
 //Main-Initialisation
 private void Start()
 {
     baseSystem = GameObject.FindGameObjectWithTag("Base_System").GetComponent <Base_System>();
 }