Exemplo n.º 1
0
    private void ShipInitialization(Region region)
    {
        Vector2 v = region.Port.CornerPosition;

        SetPosition(v);
        curOwner = region.owner;

        navAgent         = gameObject.AddComponent <NavAgent>();
        navAgent.pos     = v;
        navAgent.curCell = new Vector2Int((int)v.x, (int)v.y);
        FindLand(navAgent.curCell);
        navAgent.SetToMovable(this);
        Select(false);
        if (Player.curPlayer == curOwner)
        {
            MapMetrics.UpdateAgentVision(navAgent.curCell, navAgent.curCell, VisionRadius, 1);
        }
    }