Esempio n. 1
0
    const float CoolDownTime = .25f; //time it takes for the cooldown

    // Use this for initialization
    void Start()
    {
        grenadeCoolDown = gameObject.GetComponent <Timer>();
        //event for changing enabled tool in UI
        selectionChangeEvent = new ToolbeltEvent();
        //adding this script as an invoker for changing enabled tool in UI
        EventManager.AddSelectionChangeStasisGrenadeInvokers(this);
        //event for updating the count for the Grenade tool in the UI
        updateCountEvent = new ToolbeltCountUpdateUI();
        //adding this script as an invoker to the update count UI event
        EventManager.AddUpdateStasisGrenadeInvokers(this);
    }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        pingDeviceCount = 0;

        //event for changing the selection on the UI
        changeSelectionEvent = new ToolbeltEvent();
        //event for updating count for tool in UI
        updateCountEvent = new ToolbeltCountUpdateUI();

        //adding this script as Invokers to the two UI events
        EventManager.AddSelectionChangePingDeviceInvokers(this);
        EventManager.AddUpdatePingDeviceCountInvokers(this);
    }
Esempio n. 3
0
    // Use this for initialization
    void Start()
    {
        setStartOfPing    = false;
        pinging           = false;
        playerForPosition = GameObject.FindGameObjectWithTag("Player");
        render            = gameObject.GetComponent <SpriteRenderer>();
        //this way ping doesnt start pinging until user sets the ping
        scale = gameObject.GetComponent <Transform>();

        //event to update the tool count in UI for tripwire
        updateCountEvent = new ToolbeltCountUpdateUI();
        //adding this script as an invoker for the update count UI event
        EventManager.AddUpdateRadarPingCountInvokers(this);
    }
Esempio n. 4
0
    /// <summary>
    /// Used to initialize variables
    /// </summary>
    void Start()
    {
        //event for changing the selection on the UI
        changeSelectionEvent = new ToolbeltEvent();
        //event for updating count for tool in UI
        updateCountEvent = new ToolbeltCountUpdateUI();

        //adding this script as Invokers to the two UI events
        EventManager.AddSelectionChangeTripWireInvokers(this);
        EventManager.AddUpdateTripWireCountInvokers(this);
        //since a Unity tile unit is 1 for height and width
        //we want the explosion radius to be within 1.5 files
        explosionRadius = 2.121f;

        //distance of 2 tiles to use for placement
        //this is used for determining how far the
        //second part of trip wire can be placed before it destroys itself
        placementRadius = 2.828f;
    }
    // Use this for initialization
    void Start () {
        //event to update the tool count in UI for tripwire
        updateCountEvent = new ToolbeltCountUpdateUI();
        //adding this script as an invoker for the update count UI event
        EventManager.AddUpdateTripWireDetectionCountInvokers(this);

        player = GameObject.FindGameObjectWithTag("Player");
        //since a Unity tile unit is 1 for height and width
        //we want the explosion radius to be within 1.5 files
        explosionRadius = 2.121f;

        //distance of 2 tiles to use for placement
        //this is used for determining how far the 
        //second part of trip wire can be placed before it destroys itself
        placementRadius = 2.828f;

        //every instance sets this to false at instantiation
        //this way object doesnt think it's fully set if another instance was set and variable is true
        fullTrapSet = false;
    }