コード例 #1
0
ファイル: BaseObject.cs プロジェクト: carlor-fang/RLPX
    public virtual void Init(int id, int roomId, string name, float positionx, float positiony, float positionz, int zorder, string imageFile)
    {
        this.id     = id;
        this.roomId = roomId;
        this.name   = name;
        this.state  = GameConst.ObjectState.Deactivate;

        gameObject.name = name;
        SpriteRenderer render = GetComponent <SpriteRenderer>();

        render.sortingOrder = zorder;

        position  = new Vector3(positionx, positiony, GameConst.MapElementZ);
        imageName = imageFile;

        gameObject.transform.position = new Vector3(positionx, positiony, positionz);
    }
コード例 #2
0
ファイル: BaseObject.cs プロジェクト: carlor-fang/RLPX
 void Awake()
 {
     state = GameConst.ObjectState.None;
 }