Пример #1
0
    // ----------------------------------------------------------------
    //  Serializing
    // ----------------------------------------------------------------
    override public PropData ToData()
    {
        VeilData data = new VeilData {
            pos        = pos,
            size       = Size,
            travelMind = new TravelMindData(travelMind),
        };

        return(data);
    }
Пример #2
0
    //private Rect MyRect {
    //    get {
    //        return new Rect(sr_body.transform.localPosition, sr_body.size);
    //    }
    //}


    // ----------------------------------------------------------------
    //  Initialize
    // ----------------------------------------------------------------
    public void Initialize(Room _myRoom, VeilData data, int myIndex)
    {
        base.InitializeAsProp(_myRoom, data);
        this.myIndex = myIndex;
        Size         = data.size;

        // Color me right-o.
        sr_body.color = Colors.GroundBaseColor(WorldIndex);

        // Start opaque.
        bool isUnveiled = SaveStorage.GetBool(SaveKeys.IsVeilUnveiled(MyRoom.MyRoomData, myIndex), false);

        SetIsUnveiled(isUnveiled, false);
    }