Пример #1
0
    public void setFindFlag(bool argsBool, bool leftFlag)
    {
        GameObject exclamationPrefab = Resources.Load("Prefabs/charaBase/exclamation") as GameObject;

        charaFindFlag = argsBool;

        GameObject tmpGO = Instantiate(exclamationPrefab) as GameObject;

        tmpGO.transform.position = this.transform.position;

        textureVector ttv = new textureVector(this.gameObject);

        tmpGO.transform.position += new Vector3(0f, ttv.getHeight(animeScalingFlag), 0f);

        tmpGO.transform.parent = this.transform;


        Vector3 tmpV3 = this.transform.Find("anime").transform.localScale;

        if (leftFlag == true && tmpV3.x < 0)
        {
            this.transform.Find("anime").transform.localScale = new Vector3(tmpV3.x * -1f, tmpV3.y, tmpV3.z);
            //Debug.Log (leftFlag);
        }

        if (leftFlag == false && tmpV3.x > 0)
        {
            this.transform.Find("anime").transform.localScale = new Vector3(tmpV3.x * -1f, tmpV3.y, tmpV3.z);
            //Debug.Log (leftFlag);
        }
    }
Пример #2
0
    IEnumerator iconDelay()
    {
        yield return(new WaitForSeconds(0.5f));

        if (thisAnimeObj.transform.localScale.x > 0)
        {
            thisAnimeObj.transform.localScale += new Vector3(0.1f, 0.1f, 0f);
        }
        else
        {
            thisAnimeObj.transform.localScale += new Vector3(-0.1f, 0.1f, 0f);
        }

        GameObject exclamationPrefab = Resources.Load("Prefabs/charaBase/enemyPowerUpIcon") as GameObject;

        GameObject tmpGO = Instantiate(exclamationPrefab) as GameObject;

        tmpGO.transform.position = this.transform.position;

        textureVector ttv = new textureVector(this.gameObject);

        tmpGO.transform.position += new Vector3(0f, ttv.getHeight(true), 0f);
        tmpGO.transform.parent    = this.transform;

        thisBase.createHPBar();
    }