public override void Start()
    {
        base.Start();
        MovementSpeed     = 0f;
        CanFloat          = true;
        PlayerCanInteract = false;
        PlayerCanHit      = true;
        CanRespawn        = true;
        CanMove           = true;


        _mesh = transform.GetChild(0).GetComponent <MeshRenderer>();

        if (!SP_Manager.Instance.IsSinglePlayer())
        {
            // Set the respawn position to be further along the path so that the paddlers must help
            RespawnLocation.Add(StartPositionOnline);
            RespawnLocation.Add(new Vector3(StartPositionOnline.x * -1, StartPositionOnline.y, StartPositionOnline.z));
        }
        else
        {
            // Set the respawn position to be closer to the middle to ensure it can be seen in portrait mode
            RespawnLocation.Add(StartPositionOffline);
            RespawnLocation.Add(new Vector3(StartPositionOffline.x * -1, StartPositionOffline.y, StartPositionOffline.z));
        }
        _pickupText = GetComponentInChildren <Text>();
        PickupValue = "";
        _operations = new List <string>();
    }
示例#2
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else if (Instance != this)
     {
         Debug.Log("instance already exists, destroying object!");
         Destroy(this);
     }
 }
示例#3
0
 public RespawnEntry(RespawnLocation loc, Mobile mob)
 {
     this.loc = loc;
     this.mob = mob;
 }
示例#4
0
 public RespawnEntry(RespawnLocation loc, Mobile mob)
 {
     this.loc = loc;
     this.mob = mob;
 }