Ejemplo n.º 1
0
	void Update () {

        if (!IsLood)
        {
            
            GameObject SEA = GameObject.Find("SwordEffectAnimation");
            
            if (SEA == null)
                return;
            swordEffectAnimation = SEA.GetComponent<SwordEffectAnimation>();
            swordEffectAnimationTransform = GameObject.Find("SwordEffectAnimation").transform;
            //swordEffectAnimationTransform = SEA.transform;
            //swordEffectAnimationTransform.position = Vector3.zero;
            IsLood = true;
        }
        
        
        
        
        //if (Collision2D.GetComponent<BoxCollider2D>().enabled)
        //    Debug.Log("当たる!");
        
        //actionTymingManager.IsBladeActiond
        //  カメラ情報取得(Pos,Front,Up,Right)
        GetCameraInfo();

        if (actionTymingManager.IsBladeActiond())
            ChangeType(SwordType.MOVE);
       // Collision.enabled = false;
        if (swordType == SwordType.MOVE)
            SwordMove();
       
        if (swordType == SwordType.ATTACK)
            SwordAttack();

        if (swordType == SwordType.INTERPOLATION)
            SwordInterpolation();

        if (swordType == SwordType.STOP)
            SwordStop();

        if (swordType == SwordType.ALPHA)
            SwordAlpha();

        if(hitStop2)
        {
            
            HitStop();
            hitStop2 = false;
        }
        posFlag = false;
        tuba.GetComponent<Renderer>().material.color = swordColor;
        cube4.GetComponent<Renderer>().material.color = swordColor;
        tuka.GetComponent<Renderer>().material.color = swordColor;
        ha.GetComponent<Renderer>().material.color = swordColor;


	}
Ejemplo n.º 2
0
    void Update()
    {
        if (!IsLood)
        {
            GameObject SEA = GameObject.Find("SwordEffectAnimation");

            if (SEA == null)
            {
                return;
            }
            swordEffectAnimation          = SEA.GetComponent <SwordEffectAnimation>();
            swordEffectAnimationTransform = GameObject.Find("SwordEffectAnimation").transform;
            //swordEffectAnimationTransform = SEA.transform;
            //swordEffectAnimationTransform.position = Vector3.zero;
            IsLood = true;
        }



        //if (Collision2D.GetComponent<BoxCollider2D>().enabled)
        //    Debug.Log("当たる!");

        //actionTymingManager.IsBladeActiond
        //  カメラ情報取得(Pos,Front,Up,Right)
        GetCameraInfo();

        if (actionTymingManager.IsBladeActiond())
        {
            ChangeType(SwordType.MOVE);
        }
        // Collision.enabled = false;
        if (swordType == SwordType.MOVE)
        {
            SwordMove();
        }

        if (swordType == SwordType.ATTACK)
        {
            SwordAttack();
        }

        if (swordType == SwordType.INTERPOLATION)
        {
            SwordInterpolation();
        }

        if (swordType == SwordType.STOP)
        {
            SwordStop();
        }

        if (swordType == SwordType.ALPHA)
        {
            SwordAlpha();
        }

        if (hitStop2)
        {
            HitStop();
            hitStop2 = false;
        }
        posFlag = false;
        tuba.GetComponent <Renderer>().material.color  = swordColor;
        cube4.GetComponent <Renderer>().material.color = swordColor;
        tuka.GetComponent <Renderer>().material.color  = swordColor;
        ha.GetComponent <Renderer>().material.color    = swordColor;
    }