Exemplo n.º 1
0
    internal void ReCreateShip()
    {
        _building = Brain.GetBuildingFromKey(BuildKey);
        _shipGo   = ShipGO.Create(_root, new Vector3(), _building, this, _hType, MyId);
        MoveThruPoints1.PassGameObject(_shipGo.gameObject);

        MoveThruPoints1.WalkRoutineLoad(MoveThruPoints1.CurrTheRoute, MoveThruPoints1.GoingTo,
                                        MoveThruPoints1.CurrentRoutePoint,
                                        MoveThruPoints1.Inverse, MoveThruPoints1.WhichRoute);
    }
Exemplo n.º 2
0
Arquivo: Ship.cs Projeto: naaturaz/SM
    public void Update()
    {
        MoveThruPoints1.Update();

        if (Time.time > lastCheck + 10f)
        {
            lastCheck = Time.time;
        }

        if (_shipGo != null)
        {
            Rotation = _shipGo.transform.rotation;
            Position = _shipGo.transform.position;
        }

        if (string.IsNullOrEmpty(MyId))
        {
            MyId = _shipGo.MyId;
        }
    }