File: sunshine_setup.ss

package info (click to toggle)
opensurge 0.6.1.3%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 47,404 kB
  • sloc: ansic: 62,066; sh: 739; makefile: 193; java: 110; xml: 66; javascript: 53
file content (146 lines) | stat: -rw-r--r-- 3,450 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
// -----------------------------------------------------------------------------
// File: sunshine_setup.ss
// Description: setup object for Sunshine Paradise
// Author: Alexandre Martins <http://opensurge2d.org>
// License: MIT
// -----------------------------------------------------------------------------
using SurgeEngine.Lang;
using SurgeEngine.Level;
using SurgeEngine.Player;
using SurgeEngine.Vector2;
using SurgeEngine.Audio.Music;
using SurgeEngine.Audio.Sound;
using SurgeEngine.Events.EventList;
using SurgeEngine.Events.EventChain;
using SurgeEngine.Events.EntityEvent;
using SurgeEngine.Events.DelayedEvent;
using SurgeEngine.Events.FunctionEvent;

object "Sunshine Setup"
{
    config = {

        //
        // all zones / acts
        //
        "*": {
            "Audio Source": {
                "sound": "samples/waterfall.wav"
            },
            "Bridge": {
                "anim": 0
            },
            "Jumping Fish": {
                "anim": 0
            },
            "Mosquito": {
                "anim": 0
            },
            "Zipline Grabber": {
                "anim": 1
            },
            "Event Trigger 7": {
                "onTrigger": FunctionEvent("Lock Camera").withArgument(2048)
            },
            "Animals": {
                "theme": [0, 1, 2, 3, 5, 6, 7, 9, 13, 15]
            },
        },

        //
        // zone 1 only
        //
        "1": {
            // Bridge
            "75d7cacbe3448333": {
                "length": 8,
                "layer": "green"
            },

            // Bridge
            "ce6187aed9016033": {
                "length": 8
            },

            // Bridge
            "1706a5edf48b0e33": {
                "length": 8
            },

            // Bridge
            "9f41cc898da84f8b": {
                "length": 10
            },

            // Bridge
            "6160b07a29ec8598": {
                "length": 14
            },

            // Bridge
            "a8f66404e8ca6d3c": {
                "length": 14
            }
        },

        //
        // zone 2 only
        //
        "2": {
            // Bridge
            "15f489476699f7d5": {
                "length": 14
            },

            // Bridge
            "6a824b81a2f4ad4f": {
                "length": 18
            },

            // Bridge
            "85ac1895bc891dd1": {
                "length": 14
            },

            // Bridge
            "decfa93bc1602d3f": {
                "length": 20
            }
        },

        //
        // zone 3 only
        //
        "3": {
            "Event Trigger 7": {
                "onTrigger": EventList([
                    EntityEvent("Giant Wolf").willCall("activate"),
                    FunctionEvent("Play Boss Music"),
                    FunctionEvent("Lock Camera").withArgument(800)
                ])
            },

            "Giant Wolf": {
                "onDefeat": EventList([
                    FunctionEvent("Stop Boss Music"),
                    FunctionEvent("Lock Camera").withArgument(9999)
                ])
            }
        }

    };

    // -------------------------------------------------------------------------

    state "main"
    {
    }

    // setup the entities
    fun constructor()
    {
        zone = String(Level.act);
        Level.setup(config["*"] || { });
        Level.setup(config[zone] || { });
    }
}