Ejemplo n.º 1
0
        public void Initialize(Arm arg_arm)
        {
            m_depth = -5;

            m_lineRenderer = GetComponent <LineRenderer>();
            m_lineRenderer.material.color = Color.black;
            m_lineRenderer.startWidth     = 0.1f;
            m_lineRenderer.endWidth       = 0.1f;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// アームからのコールバック
 /// アームが腕を縮み終えたときに実行される
 /// </summary>
 /// <param name="arg_arm"></param>
 void IArmCallBackReceiver.OnEndShorten(Arm arg_arm)
 {
     m_hand.gameObject.SetActive(false);
     if (m_hand.GraspingItem)
     {
         if (m_hand.GraspingItem.Reaction == Item.GraspedReaction.PULL_TO_ITEM)
         {
             AppManager.Instance.m_timeManager.Resume();
             return;
         }
     }
     StartCoroutine(AsleepArm());
 }
Ejemplo n.º 3
0
        public void UpdateByFrame(Arm arg_arm)
        {
            //m_lineRenderer.sortingOrder = m_depth;

            if (arg_arm.m_currentState.GetType() == typeof(ArmStandByState))
            {
                m_lineRenderer.numPositions = 0;
            }
            else
            {
                m_lineRenderer.numPositions = 2;
                m_lineRenderer.SetPosition(0, (Vector3)arg_arm.GetBottomPosition() + (Vector3.forward * -m_depth));
                m_lineRenderer.SetPosition(1, (Vector3)arg_arm.GetTopPosition() + (Vector3.forward * -m_depth));
            }
        }
Ejemplo n.º 4
0
        public void Initialize()
        {
            m_inputHandle  = new InputHandle();
            m_currentState = new OnPlayerGroundedState();
            m_currentState.OnEnter(this);
            m_rigidbody = GetComponent <Rigidbody2D>();
            m_collider  = GetComponent <BoxCollider2D>();

            m_viewer = GetComponentInChildren <PlayerViewer>();
            m_viewer.Initialize(this);
            m_arm = GetComponentInChildren <Arm>();
            m_arm.SetOwner(this);
            m_arm.Initialize();
            m_hand         = FindObjectOfType <Hand>();
            m_playableArm  = m_arm;
            m_playableHand = m_hand;
            m_hand.SetOwner(this);
            m_hand.Initialize();
        }
Ejemplo n.º 5
0
 /// <summary>
 /// アームからのコールバック
 /// アームが腕を伸ばし始めときに実行される
 /// </summary>
 /// <param name="arg_arm"></param>
 void IArmCallBackReceiver.OnStartLengthen(Arm arg_arm)
 {
     m_hand.gameObject.SetActive(true);
 }
Ejemplo n.º 6
0
 void IArmCallBackReceiver.OnEndShorten(Arm arg_arm)
 {
     //AppManager.Instance.m_timeManager.Resume();
 }
Ejemplo n.º 7
0
        //----------------------------------------
        //	アームからのコールバック
        //----------------------------------------
        #region アームからのコールバック(時間停止用)

        void IArmCallBackReceiver.OnStartLengthen(Arm arg_arm)
        {
            //AppManager.Instance.m_timeManager.Pause();
        }