Exemplo n.º 1
0
    private void Awake()
    {
        cMan = GetComponent<PRAC_Off_Man>();    

        cPick = GetComponent<PROFST_Pick>();
        cPost = GetComponent<PROFST_Post>();
        cLive = GetComponent<PROFST_Live>();
        cPre = GetComponent<PROFST_Pre>();

    }
Exemplo n.º 2
0
    void Start()
    {
        cPick = GetComponent <PROFST_Pick>();
        cPost = GetComponent <PROFST_Post>();
        cLive = GetComponent <PROFST_Live>();
        cPre  = GetComponent <PROFST_Pre>();

        cAud = GetComponentInChildren <AD_Prac>();

        cPick.FEnter();
    }
Exemplo n.º 3
0
    // Basically we're just testing for if they are hitting the offensive plays.
    public virtual void FRunUpdate()
    {
        if (Input.GetMouseButtonDown(0))
        {
            // first, we raycast to make sure we're over the field. Because we can't spawn a player randomly off the field.
            RaycastHit2D hit = Physics2D.Raycast(Input.mousePosition, Vector2.zero);

            if (hit.collider != null)
            {
                if (hit.collider.GetComponent <PRAC_PlayArt>() != null)
                {
                    string sName = hit.collider.GetComponent <PRAC_PlayArt>().mName;
                    Debug.Log("Picked: " + sName);

                    PROFST_Pick pPicker = FindObjectOfType <PROFST_Pick>();
                    pPicker.FOffPlayPicked(sName);
                }
            }
            else
            {
                Debug.Log("Hit nothing");
            }
        }
    }