Example #1
0
    //******************************************************************************************************************************
    //
    //      FUNCTIONS
    //
    //******************************************************************************************************************************


    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    /// <summary>
    //  Called before Start().
    /// </summary>
    protected override void Awake()
    {
        base.Awake();

        // Get component references
        if (QuadMinimap != null)
        {
            _MinimapQuadRenderer = QuadMinimap.GetComponent <Renderer>();
        }
        FogUnit _FogOfWarSight = GetComponent <FogUnit>();
    }
Example #2
0
    //******************************************************************************************************************************
    //
    //      FUNCTIONS
    //
    //******************************************************************************************************************************

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    /// <summary>
    //  Called before Start().
    /// </summary>
    protected override void Awake()
    {
        base.Awake();

        // Initialize lists
        _PotentialTargets = new List <WorldObject>();

        // Set fog vision radius
        FogUnit _FogOfWarSight = GetComponent <FogUnit>();

        _FogOfWarSight.Radius = MaxAttackingRange * 1.5f;
    }
Example #3
0
    //******************************************************************************************************************************
    //
    //      FUNCTIONS
    //
    //******************************************************************************************************************************

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    /// <summary>
    //  This is called before Startup().
    /// </summary>
    protected virtual void Awake()
    {
        selectionBounds = Settings.InvalidBounds;
        CalculateBounds();

        // Get components
        _FogVision        = GetComponent <FogUnit>();
        _OutlineComponent = GetComponent <Outline>();
        if (_OutlineComponent == null)
        {
            _OutlineComponent = GetComponentInChildren <Outline>();
        }
    }