Beispiel #1
0
 // Use this for initialization
 public override void Start()
 {
     sceneController = (myGameObject)SSDirector.getInstance().currentSceneController;
     if (this.gameobject != null)
     {
         Disk = sceneController.disk.findDisk(this.transform.name);
     }
 }
Beispiel #2
0
    /*
     * Constructeur d'ObjectPos
     */
    public static ObjectPos newObjectPos(int posX, int posY, myGameObject type)
    {
        ObjectPos elem = new ObjectPos();

        elem.posX = posX;
        elem.posY = posY;
        elem.type = type;
        return(elem);
    }
Beispiel #3
0
    // Use this for initialization
    public override void Start()
    {
        sceneController = (myGameObject)SSDirector.getInstance().currentSceneController;
        int level = (int)sceneController.disk.findDisk(this.transform.name).speed / 5;

        force = new Vector3(1 * Random.Range(-1, 1) * level, 1 * Random.Range(0.5f, 2) * level, sceneController.disk.findDisk(this.transform.name).speed);
        begin = new Vector3(3 * Random.Range(-2, 2), -4, -10);
        this.transform.position = begin;
        sceneController.disk.findDisk(this.transform.name).stop = false;
    }
Beispiel #4
0
 // Use this for initialization
 public override void Start()
 {
     sceneController = (myGameObject)SSDirector.getInstance().currentSceneController;
     if (this.gameobject != null)
     {
         patrol = sceneController.patrol.getPatrol(this.transform.name);
     }
     dis    = patrol.location;
     player = sceneController.player.player;
     this.gameobject.GetComponent <Animation>().Play();
 }
Beispiel #5
0
 public Player(myGameObject obj, long updateTime)
 {
     id          = obj.id;
     name        = obj.name;
     pos_x       = obj.pos_x;
     pos_y       = obj.pos_y;
     rotation    = obj.rotation;
     color_red   = obj.color_red;
     color_blue  = obj.color_blue;
     color_green = obj.color_green;
     lastUpdate  = updateTime;
 }
Beispiel #6
0
	public Player(myGameObject obj, long updateTime)
	{
		id = obj.id;
		name = obj.name;
		pos_x = obj.pos_x;
		pos_y = obj.pos_y;
		rotation = obj.rotation;
		color_red = obj.color_red;
		color_blue = obj.color_blue;
		color_green = obj.color_green;
		lastUpdate = updateTime;
	}
Beispiel #7
0
 // Use this for initialization
 void Start()
 {
     sceneController = (myGameObject)SSDirector.getInstance().currentSceneController;
     sceneController.actionManager = this;
 }
Beispiel #8
0
 // Use this for initialization
 void Start()
 {
     sceneController = (myGameObject)SSDirector.getInstance().currentSceneController;
     player          = sceneController.player;
 }
Beispiel #9
0
 // Use this for initialization
 public override void Start()
 {
     sceneController = (myGameObject)SSDirector.getInstance().currentSceneController;
 }