Пример #1
0
    // Use this for initialization
    void Start()
    {
        //
        parentMenu  = this.gameObject.GetComponentInParent <charaMenu_parent> ();
        parentChara = parentMenu.getAllCharaScript();
        thisAnime   = this.gameObject.GetComponentInParent <Animator> ();

        //

        /*
         * thisPosition = this.gameObject.transform;
         *
         * Vector3 tmpV = new Vector3 (-10f, 0f, 0f);
         * tmpV = tmpV + thisPosition.localPosition ;
         *
         * this.gameObject.transform.localPosition = tmpV;
         */
        thisSpriteR = this.gameObject.GetComponent <SpriteRenderer>();

        Color tmpC = thisSpriteR.color;

        tmpC.a            = 1f;
        thisSpriteR.color = tmpC;

        //スキルボタン、且つクールタイムが終わっていない場合、ボタンは削除される
        if (thisButtonType == 3)
        {
            float tmpF = parentChara.getRestCoolTime();
            if (tmpF > 0.01f)
            {
                Destroy(this.gameObject);
            }
        }
    }
    void Start()
    {
        parentMenu  = this.gameObject.GetComponentInParent <charaMenu_parent> ();
        parentChara = parentMenu.getAllCharaScript();

        thisSR = this.GetComponent <SpriteRenderer> ();

        this.autoSetSprite();
    }
Пример #3
0
    void OnMouseDown()
    {
        thisCharaBase = this.transform.parent.GetComponent <charaIconsetManager> ().thisCharaBase;
        thisCharaFlag = this.transform.parent.GetComponent <charaIconsetManager> ().thisCharaFlag;

        dragCancelF = false;

        if (doubleClickCheck == false)
        {
            doubleClickCheck = true;
            StartCoroutine(doubleClickWait());
        }
        else
        {
            //ダブルクリックされた
            doubleClickCheck = false;

            //トラッキングのリセット(他キャラをロックしている場合、移動しないため)
            trackingObj.GetComponentInChildren <cameraTrackerScript>().setCharaTrackReset();

            Vector3 tmpV = new Vector3(thisCharaBase.transform.position.x, thisCharaBase.transform.position.y, -20f);
            Camera.main.transform.position = tmpV;

            //スキルウェイト中は表示しない
            allCharaBase thisCharaBaseScrpt = thisCharaBase.GetComponentInChildren <allCharaBase> ();
            if (thisCharaBaseScrpt.thisChara.battleStatus.charaMode == characterMode.Skill)
            {
                soundManagerGetter.getManager().playOneShotSound(enm_oneShotSound.skillCancel);
                return;
            }

            soundManagerGetter.getManager().playOneShotSound(enm_oneShotSound.charaMenu);

            charaMenuInstance = Instantiate(_characterMenu) as GameObject;
            charaMenu_parent cmp = charaMenuInstance.GetComponentInChildren <charaMenu_parent> ();
            cmp.setParentChara(thisCharaBase);
            cmp.setParentIconSet(this.gameObject.transform.parent.gameObject);

            charaMenu_statusLabel tmpLabel = charaMenuInstance.GetComponentInChildren <charaMenu_statusLabel> ();
            tmpLabel._labelStatus = this.transform.parent.GetComponent <charaIconsetManager> ().labelStatus;
        }
    }
    // Use this for initialization
    void Start()
    {
        thisTrgt = new skillTargetInfo();

        thisTrgt.worldPosision = new Vector3(0, 0, 0);
        thisTrgt.zAngle        = 0f;

        parentMenu       = this.transform.parent.GetComponent <charaMenu_parent>();
        parentChara      = parentMenu.getAllCharaScript();
        thisTrgt.charaNo = parentChara.thisChara.charaNo;

        Vector3 tmpV_zero = new Vector3(0, 0, 0);

        switch (parentChara.thisChara.charaNo)
        {
        case enumCharaNum.syusuran_02:
        case enumCharaNum.akane_04:
        case enumCharaNum.mokuren_06:
        case enumCharaNum.sion_08:
        case enumCharaNum.hiragi_09:

            thisSkilltgt = Instantiate(_SkillTarget_Arrow) as GameObject;

            thisSkilltgt.transform.parent        = this.transform;
            thisSkilltgt.transform.localPosition = tmpV_zero;

            thisTrgt.zAngle = thisSkilltgt.transform.localRotation.z;

            break;

        default:

            thisSkilltgt = Instantiate(_SkillTarget_Circle) as GameObject;

            thisSkilltgt.transform.parent        = this.transform;
            thisSkilltgt.transform.localPosition = tmpV_zero;

            break;
        }
    }