コード例 #1
0
 void Start()
 {
     m_physicBhv = GetComponent <PhysicCharBehaviour>();
     m_dirAnim   = GetComponent <DirectionalAnimation>();
     StopAllCoroutines();
     StartCoroutine(DoLogic());
 }
コード例 #2
0
 void Start()
 {
     m_animCtrl = GetComponents <DirectionalAnimation>()[0];
     m_phyChar  = GetComponent <PhysicCharBehaviour>();
     TargetTile = RpgMapHelper.GetAutoTileByPosition(transform.position, 0);
     ableToMove = true;
 }
コード例 #3
0
 void Start()
 {
     m_fAngOff = 360f * Random.value;
     m_moving  = GetComponent <MovingBehaviour>();
     m_phyChar = GetComponent <PhysicCharBehaviour>();
     m_pathFindingBehaviour = GetComponent <MapPathFindingBehaviour>();
     m_animCtrl             = GetComponent <DirectionalAnimation>();
 }
コード例 #4
0
ファイル: FollowerAI.cs プロジェクト: yabos/BattleHit
 // Use this for initialization
 void Start()
 {
     m_fAngOff = 360f * Random.value;
     m_player = GameObject.FindGameObjectWithTag("Player");
     m_moving = GetComponent<MovingBehaviour>();
     m_phyChar = GetComponent<PhysicCharBehaviour>();
     m_pathFindingBehaviour = GetComponent<MapPathFindingBehaviour>();
     m_animCtrl = GetComponent<DirectionalAnimation>();
 }
コード例 #5
0
ファイル: NewAI.cs プロジェクト: hillmb1/WayOfKings
 // Use this for initialization
 void Start()
 {
     m_animCtrl = GetComponent <DirectionalAnimation>();
     m_phyChar  = GetComponent <PhysicCharBehaviour>();
     targetTile = this.transform.position;
     ableToMove = true;
     spawnTile  = targetTile;
     tmov       = GetComponent <TileMovementBehaviour> ();
     curr       = transform.position;
     foundTarg  = false;
 }
コード例 #6
0
 // Use this for initialization
 void Start()
 {
     //charinv = this.GetComponent<Inventory> ();
     equipManager   = new idvEquip();
     m_charAnimCtrl = GetComponent <DirectionalAnimation>();
     hashT          = new Dictionary <string, GameObject>();
     phy            = GetComponent <PhysicCharBehaviour> ();
     hashT.Add("Helm", equipManager.helm);
     hashT.Add("Chest", equipManager.chest);
     hashT.Add("Legs", equipManager.legs);
     hashT.Add("Weapon", equipManager.weapon);
     hashT.Add("Shield", equipManager.shield);
     hashT.Add("Necklace", equipManager.necklace);
     hashT.Add("Ring", equipManager.ring);
     animName = "Blank char";
 }
コード例 #7
0
        public void OnSceneGUI()
        {
            if (!m_toggleEditColliderRect)
            {
                return;
            }

            PhysicCharBehaviour myTarget = (PhysicCharBehaviour)target;

            float fHandleSize = 0.04f * HandleUtility.GetHandleSize(myTarget.transform.position);

            Vector3[] verts = new Vector3[]
            {   //NOTE: GUI Y axis has opposite direction, so y sign is changed
                new Vector3(myTarget.CollRect.xMin, myTarget.CollRect.yMin, 0) + myTarget.transform.position,
                new Vector3(myTarget.CollRect.xMax, myTarget.CollRect.yMin, 0) + myTarget.transform.position,
                new Vector3(myTarget.CollRect.xMax, myTarget.CollRect.yMax, 0) + myTarget.transform.position,
                new Vector3(myTarget.CollRect.xMin, myTarget.CollRect.yMax, 0) + myTarget.transform.position,
            };
            Handles.DrawSolidRectangleWithOutline(verts, new Color(0, 0, 0, 0), new Color(0f, 0.4f, 1f));

            Vector3[] handles = new Vector3[verts.Length];
            for (int i = 0; i < verts.Length; ++i)
            {
                handles[i]    = (verts[i] + verts[(i + 1) % verts.Length]) / 2;
                Handles.color = Color.cyan;
                handles[i]    = Handles.FreeMoveHandle(handles[i], Quaternion.identity, fHandleSize, Vector3.zero, EditorCompatibilityUtils.DotCap);
                //handles[i].y = -handles[i].y; // restore y sign
                handles[i] -= myTarget.transform.position;
            }

            myTarget.CollRect.yMin = handles[0].y;
            myTarget.CollRect.xMax = handles[1].x;
            myTarget.CollRect.yMax = handles[2].y;
            myTarget.CollRect.xMin = handles[3].x;

            Vector3 vCenter = new Vector3(myTarget.CollRect.center.x, myTarget.CollRect.center.y);

            vCenter  = Handles.FreeMoveHandle(vCenter + myTarget.transform.position, Quaternion.identity, fHandleSize, Vector3.zero, EditorCompatibilityUtils.DotCap);
            vCenter -= myTarget.transform.position;
            myTarget.CollRect.center = new Vector2(vCenter.x, vCenter.y);

            if (GUI.changed)
            {
                EditorUtility.SetDirty(target);
            }
        }
コード例 #8
0
 protected virtual void Start()
 {
     m_animCtrl = GetComponent <DirectionalAnimation>();
     m_phyChar  = GetComponent <PhysicCharBehaviour>();
 }
コード例 #9
0
 protected override void Start()
 {
     base.Start();
     m_playerCtrl = GameObject.FindObjectOfType <PlayerController>();
     phyChar      = GetComponent <PhysicCharBehaviour>();
 }
コード例 #10
0
ファイル: CompanionAI.cs プロジェクト: yabos/BattleHit
 void Start()
 {
     m_physicBhv = GetComponent<PhysicCharBehaviour>();
     m_dirAnim = GetComponent<DirectionalAnimation>();
     StopAllCoroutines();
     StartCoroutine(DoLogic());
 }
コード例 #11
0
 protected override void Start()
 {
     base.Start();
     m_playerCtrl = GameObject.FindObjectOfType<PlayerController>();
     phyChar = GetComponent<PhysicCharBehaviour>();
 }
コード例 #12
0
 protected virtual void Start()
 {
     m_animCtrl = GetComponent<DirectionalAnimation>();
     m_phyChar = GetComponent<PhysicCharBehaviour>();
 }