小精灵
This commit is contained in:
parent
8e2f1178a1
commit
0b8c78b935
@ -137,7 +137,12 @@ public class BaoshiRoomcontroller : MonoBehaviour
|
||||
musk.gameObject.SetActive(false);
|
||||
fishMan = GameObject.Instantiate(fishManPrefab, this.transform);
|
||||
fishManlist.Add(fishMan);
|
||||
fishMan.transform.position = endPos.position;
|
||||
|
||||
Vector3 pos = new Vector3(Random.Range((endPos.position.x - startPos.position.x) / 2, endPos.position.x), endPos.position.y, endPos.position.z);
|
||||
fishMan.transform.position = pos;
|
||||
|
||||
|
||||
|
||||
fishManShipContorl = fishMan.GetComponent<minerControl>();
|
||||
fishManShipContorl.init(this.paths, this.pathsNeedTimer, this.fishingNeedTimer, this.restTimer, this.startPos, this.endPos);
|
||||
|
||||
|
@ -75,7 +75,7 @@ public class Scene_baoshikuang : MonoBehaviour
|
||||
go.ShipNumber = info.activate_count;
|
||||
index++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ public class minerControl : MonoBehaviour
|
||||
public void init(List<Path> path,float pathsNeedTimer,float fishingNeedTimer,float restTimer,Transform startPos,Transform endPos)
|
||||
{
|
||||
this.paths = path;
|
||||
this.pathsNeedTimer = pathsNeedTimer;
|
||||
this.pathsNeedTimer = pathsNeedTimer+Random.Range(0,10);
|
||||
this.fishingNeedTimer = fishingNeedTimer;
|
||||
this.restTimer = restTimer;
|
||||
this.startPos = startPos;
|
||||
|
@ -129,7 +129,10 @@ public class roomcontroller : MonoBehaviour
|
||||
musk.gameObject.SetActive(false);
|
||||
fishMan = GameObject.Instantiate(fishManPrefab, this.transform);
|
||||
fishManlist.Add(fishMan);
|
||||
fishMan.transform.position = endPos.position;
|
||||
|
||||
Vector3 pos = new Vector3(Random.Range((endPos.position.x-startPos.position.x)/2, endPos.position.x), endPos.position.y, endPos.position.z);
|
||||
fishMan.transform.position = pos;
|
||||
|
||||
fishManShipContorl = fishMan.GetComponent<minerControl>();
|
||||
fishManShipContorl.init(this.paths, this.pathsNeedTimer, this.fishingNeedTimer, this.restTimer, this.startPos, this.endPos);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user