Beispiel #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;
        }
Beispiel #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());
 }
Beispiel #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));
            }
        }
Beispiel #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();
        }
Beispiel #5
0
 /// <summary>
 /// アームからのコールバック
 /// アームが腕を伸ばし始めときに実行される
 /// </summary>
 /// <param name="arg_arm"></param>
 void IArmCallBackReceiver.OnStartLengthen(Arm arg_arm)
 {
     m_hand.gameObject.SetActive(true);
 }
Beispiel #6
0
 void IArmCallBackReceiver.OnEndShorten(Arm arg_arm)
 {
     //AppManager.Instance.m_timeManager.Resume();
 }
Beispiel #7
0
        //----------------------------------------
        //	アームからのコールバック
        //----------------------------------------
        #region アームからのコールバック(時間停止用)

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