Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scilla-kickball
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
scilla-kickball
Commits
9b065afa
Commit
9b065afa
authored
Apr 22, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0dca725c
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
1288 additions
and
1175 deletions
+1288
-1175
RedFire.pfb
assets/prefabs/RedFire.pfb
+49
-0
RedFire.pfb.meta
assets/prefabs/RedFire.pfb.meta
+1
-0
main.scene
assets/scenes/main.scene
+14
-1
BallItem.ts
assets/scripts/scenes/BallItem.ts
+2
-23
Body.ts
assets/scripts/scenes/Body.ts
+18
-0
Body.ts.meta
assets/scripts/scenes/Body.ts.meta
+1
-0
RedFireItem.ts
assets/scripts/scenes/RedFireItem.ts
+8
-0
RedFireItem.ts.meta
assets/scripts/scenes/RedFireItem.ts.meta
+1
-0
ScenePlay.ts
assets/scripts/scenes/ScenePlay.ts
+14
-5
play.sht.meta
assets/sheets/play.sht.meta
+1
-1
red20.png
assets/sheets/play.sht/red20.png
+0
-0
淡蓝火箭-1.png
assets/sheets/play.sht/淡蓝火箭-1.png
+0
-0
bundle.js
debug/bundle.js
+1166
-1138
bundle.js.map
debug/bundle.js.map
+1
-1
MustCompile.ts
src/generated/MustCompile.ts
+12
-6
No files found.
assets/prefabs/RedFire.pfb
0 → 100644
View file @
9b065afa
{
"name": "RedFire",
"root": {
"uuid": "20190301114308",
"components": [
{
"script": "components/base/Transform"
},
{
"script": "components/other/CameraController"
}
],
"children": [
{
"uuid": "20190301114245",
"name": "RedFire",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "./scripts/scenes/RedFireItem",
"properties": {}
}
],
"children": [
{
"name": "Image",
"components": [
{
"script": "components/base/Transform",
"properties": {}
},
{
"script": "components/renderer/TextureRenderer",
"properties": {
"texture": "res|1dd2cb82-b58a-49d5-9e87-a585b1d44d2d"
}
}
],
"uuid": "35827ccd-03af-42fd-868b-5ba42f8ee992"
}
]
}
]
},
"entity-cache": []
}
\ No newline at end of file
assets/prefabs/RedFire.pfb.meta
0 → 100644
View file @
9b065afa
{"ver":"1.0.1","uuid":"83d50df9-266c-478f-bf01-21d478abe049","subMetas":{},"type":"prefab"}
assets/scenes/main.scene
View file @
9b065afa
...
...
@@ -64,7 +64,8 @@
"properties": {
"bulletNumTxt": "entity|f02aa1f7-3255-405e-a537-7ba4ef503aa7",
"strengthNumTxt": "entity|70838016-4fab-4a0f-90aa-61c4303a4ecc",
"BallItemPrefab": "res|8ebdfe78-ea44-445d-8bbe-02a22874e896"
"BallItemPrefab": "res|8ebdfe78-ea44-445d-8bbe-02a22874e896",
"RedFirePrefab": "res|83d50df9-266c-478f-bf01-21d478abe049"
}
}
],
...
...
@@ -703,6 +704,10 @@
"uuid": "8ebdfe78-ea44-445d-8bbe-02a22874e896",
"url": "prefabs/BallItem.pfb"
},
{
"uuid": "83d50df9-266c-478f-bf01-21d478abe049",
"url": "prefabs/RedFire.pfb"
},
{
"uuid": "e00fab97-a62c-459b-a61b-a9d7a1e10a21",
"url": "sheets/play.sht-disperse",
...
...
@@ -755,6 +760,14 @@
{
"name": "黄-1.png",
"uuid": "4db8fa73-7721-42e3-bf6c-d4665dbbfe32"
},
{
"name": "淡蓝火箭-1.png",
"uuid": "aa4bc010-fa6b-4194-8795-8321390f0ff4"
},
{
"name": "red20.png",
"uuid": "1dd2cb82-b58a-49d5-9e87-a585b1d44d2d"
}
]
}
...
...
assets/scripts/scenes/BallItem.ts
View file @
9b065afa
import
ScillaComponent
from
'components/base/ScillaComponent'
;
import
{
Transform
}
from
'scilla-components/src'
;
import
{
gravityY
}
from
'./gameconst'
;
import
Body
from
'./Body'
;
export
default
class
BallItem
extends
ScillaComponent
{
private
_bounceY
=
0
;
private
_velocityY
=
0
;
onUpdate
()
{
const
{
entity
}
=
this
;
this
.
_velocityY
+=
gravityY
;
entity
.
getComponent
(
Transform
).
position
.
y
+=
this
.
_velocityY
;
}
export
default
class
BallItem
extends
Body
{
revertY
()
{
this
.
_velocityY
*=
-
1
*
this
.
_bounceY
;
console
.
log
(
this
.
_velocityY
)
}
set
bounceY
(
val
:
number
)
{
this
.
_bounceY
=
val
;
}
get
bounceY
()
{
return
this
.
_bounceY
;
}
}
\ No newline at end of file
assets/scripts/scenes/Body.ts
0 → 100644
View file @
9b065afa
import
ScillaComponent
from
'components/base/ScillaComponent'
;
import
{
Transform
}
from
'scilla-components/src'
;
import
{
gravityY
}
from
'./gameconst'
;
export
default
class
Body
extends
ScillaComponent
{
bounceY
=
0
;
private
_velocityY
=
0
;
onUpdate
()
{
const
{
entity
}
=
this
;
this
.
_velocityY
+=
gravityY
;
entity
.
getComponent
(
Transform
).
position
.
y
+=
this
.
_velocityY
;
}
revertY
()
{
this
.
_velocityY
*=
-
1
*
this
.
bounceY
;
console
.
log
(
this
.
_velocityY
)
}
}
\ No newline at end of file
assets/scripts/scenes/Body.ts.meta
0 → 100644
View file @
9b065afa
{"ver":"1.0.1","uuid":"164cf9b9-aaf6-4628-ad67-9f6fb146e7e9","subMetas":{},"type":"script"}
assets/scripts/scenes/RedFireItem.ts
0 → 100644
View file @
9b065afa
import
Body
from
'./Body'
;
import
ScillaComponent
from
'scilla-components/src/base/ScillaComponent'
;
export
default
class
RedFireItem
extends
ScillaComponent
{
constructor
()
{
super
();
}
}
\ No newline at end of file
assets/scripts/scenes/RedFireItem.ts.meta
0 → 100644
View file @
9b065afa
{"ver":"1.0.1","uuid":"f380be1a-f683-4034-88b3-95f43e606364","subMetas":{},"type":"script"}
assets/scripts/scenes/ScenePlay.ts
View file @
9b065afa
/**
* Created by rockyl on 2019-04-09.
*/
import
{
Component
,
Entity
,
resource
,
instantiate
}
from
"scilla"
;
import
{
alien
}
from
"../navigator/StackNavigator"
;
import
{
INavigatorViewBase
}
from
"../navigator/VirtualNavigator"
;
import
{
Transform
}
from
'scilla-components/src'
;
import
ScillaComponent
from
'scilla-components/src/base/ScillaComponent'
;
import
BallItem
from
'./BallItem'
;
import
RedFireItem
from
'./RedFireItem'
;
import
ScillaComponent
from
'scilla-components/src/base/ScillaComponent'
;
const
GROUND_Y
=
250
;
//碰到地板时,球的中心点的y
export
default
class
ScenePlay
extends
ScillaComponent
implements
INavigatorViewBase
{
BallItemPrefab
:
resource
;
test
Prefab
:
resource
;
RedFire
Prefab
:
resource
;
bulletNumTxt
:
Entity
;
strengthNumTxt
:
Entity
;
ballList
:
Entity
[];
redFireList
:
Entity
[];
getRedFireItem
()
{
const
redFire
=
instantiate
(
this
.
RedFirePrefab
);
this
.
entity
.
addChild
(
redFire
);
this
.
redFireList
.
push
(
redFire
);
// (redFire.getComponent(RedFireItem) as RedFireItem).bounceY = 0.9;
}
getBallItem
()
{
const
ball
=
instantiate
(
this
.
BallItemPrefab
);
this
.
entity
.
addChild
(
ball
);
this
.
ballList
.
push
(
ball
);
console
.
log
(
ball
.
getComponent
(
Transform
).
position
.
y
);
(
ball
.
getComponent
(
BallItem
)
as
BallItem
).
bounceY
=
0.99
;
(
ball
.
getComponent
(
BallItem
)
as
BallItem
).
bounceY
=
1
;
}
onAwake
()
{
...
...
@@ -43,7 +51,8 @@ export default class ScenePlay extends ScillaComponent implements INavigatorView
onDidEnter
(
last
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
(
this
.
entity
.
getComponent
(
Transform
)
as
Transform
).
alpha
=
1
;
this
.
getBallItem
();
// this.getBallItem();
this
.
getRedFireItem
();
}
onDidLeave
(
next
:
string
,
action
:
alien
.
NavigatorAction
,
parameters
:
any
):
void
{
...
...
assets/sheets/play.sht.meta
View file @
9b065afa
{"ver":"1.0.1","uuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","subMetas":{"火-1.png":{"ver":"1.0.1","uuid":"94680781-2b1b-432e-9858-4ff21dd04d0c","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"},"火箭-1.png":{"ver":"1.0.1","uuid":"2f8360c7-b059-4f1e-b651-37a32eb4a247","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"},"发弹雾气-1.png":{"ver":"1.0.1","uuid":"f67e2e09-e0f4-4aea-8243-8d86a4ded38a","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"},"1-1-1.png":{"ver":"1.0.1","uuid":"cb4651fa-3d76-43c6-89a9-d06ddda3c110","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"},"大炮板子-1.png":{"ver":"1.0.1","uuid":"abdded14-a2d2-4000-b264-9ff47c843149","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"},"大炮的头-1.png":{"ver":"1.0.1","uuid":"ade44f23-754d-4923-a713-76f4207c3bde","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"},"淡蓝-1.png":{"ver":"1.0.1","uuid":"2952264c-5a8b-4eda-9a15-812e4e7738ae","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"},"紫-1.png":{"ver":"1.0.1","uuid":"60460a1c-e1b6-45c6-a905-f1233ffd0853","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"},"红-1.png":{"ver":"1.0.1","uuid":"98d8e939-fbfb-46fa-9622-60164aa8aa4b","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"},"绿-1.png":{"ver":"1.0.1","uuid":"8babbf6b-a2a2-4fc0-a634-4268607cbf9c","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"},"蓝-1.png":{"ver":"1.0.1","uuid":"b664db72-fb4f-45fb-8f50-908f3d133bdc","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"},"黄-1.png":{"ver":"1.0.1","uuid":"4db8fa73-7721-42e3-bf6c-d4665dbbfe32","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"}},"type":"sheet"}
{"ver":"1.0.1","uuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","subMetas":{"火-1.png":{"ver":"1.0.1","uuid":"94680781-2b1b-432e-9858-4ff21dd04d0c","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"},"火箭-1.png":{"ver":"1.0.1","uuid":"2f8360c7-b059-4f1e-b651-37a32eb4a247","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"},"发弹雾气-1.png":{"ver":"1.0.1","uuid":"f67e2e09-e0f4-4aea-8243-8d86a4ded38a","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"},"1-1-1.png":{"ver":"1.0.1","uuid":"cb4651fa-3d76-43c6-89a9-d06ddda3c110","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"},"大炮板子-1.png":{"ver":"1.0.1","uuid":"abdded14-a2d2-4000-b264-9ff47c843149","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"},"大炮的头-1.png":{"ver":"1.0.1","uuid":"ade44f23-754d-4923-a713-76f4207c3bde","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"},"淡蓝-1.png":{"ver":"1.0.1","uuid":"2952264c-5a8b-4eda-9a15-812e4e7738ae","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"},"紫-1.png":{"ver":"1.0.1","uuid":"60460a1c-e1b6-45c6-a905-f1233ffd0853","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"},"红-1.png":{"ver":"1.0.1","uuid":"98d8e939-fbfb-46fa-9622-60164aa8aa4b","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"},"绿-1.png":{"ver":"1.0.1","uuid":"8babbf6b-a2a2-4fc0-a634-4268607cbf9c","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"},"蓝-1.png":{"ver":"1.0.1","uuid":"b664db72-fb4f-45fb-8f50-908f3d133bdc","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"},"黄-1.png":{"ver":"1.0.1","uuid":"4db8fa73-7721-42e3-bf6c-d4665dbbfe32","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"}
,"淡蓝火箭-1.png":{"ver":"1.0.1","uuid":"aa4bc010-fa6b-4194-8795-8321390f0ff4","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"},"red20.png":{"ver":"1.0.1","uuid":"1dd2cb82-b58a-49d5-9e87-a585b1d44d2d","rawTextureUuid":"e00fab97-a62c-459b-a61b-a9d7a1e10a21","type":"texture"}
},"type":"sheet"}
assets/sheets/play.sht/red20.png
0 → 100644
View file @
9b065afa
2.07 KB
assets/sheets/play.sht/淡蓝火箭-1.png
0 → 100644
View file @
9b065afa
2.11 KB
debug/bundle.js
View file @
9b065afa
This source diff could not be displayed because it is too large. You can
view the blob
instead.
debug/bundle.js.map
View file @
9b065afa
This diff is collapsed.
Click to expand it.
src/generated/MustCompile.ts
View file @
9b065afa
...
...
@@ -5,8 +5,8 @@
import
{
registerDef
}
from
'scilla'
import
component0
from
'components/
renderer/TextRenderer
'
;
registerDef
(
'components/
renderer/TextRenderer
'
,
component0
);
import
component0
from
'components/
animation/TouchZoom
'
;
registerDef
(
'components/
animation/TouchZoom
'
,
component0
);
import
component1
from
'components/base/Transform'
;
registerDef
(
'components/base/Transform'
,
component1
);
...
...
@@ -26,14 +26,14 @@ registerDef('components/renderer/TextureRenderer', component5);
import
component6
from
'components/other/RelativeLayout'
;
registerDef
(
'components/other/RelativeLayout'
,
component6
);
import
component7
from
'components/
other/CameraControll
er'
;
registerDef
(
'components/
other/CameraControll
er'
,
component7
);
import
component7
from
'components/
renderer/TextRender
er'
;
registerDef
(
'components/
renderer/TextRender
er'
,
component7
);
import
component8
from
'components/ui/Button'
;
registerDef
(
'components/ui/Button'
,
component8
);
import
component9
from
'components/
animation/TouchZoom
'
;
registerDef
(
'components/
animation/TouchZoom
'
,
component9
);
import
component9
from
'components/
other/CameraController
'
;
registerDef
(
'components/
other/CameraController
'
,
component9
);
import
component10
from
'../../assets/scripts/scenes/SceneStart'
;
registerDef
(
'./scripts/scenes/SceneStart'
,
component10
);
...
...
@@ -52,3 +52,9 @@ registerDef('./scripts/dialogs/RulePanel', component14);
import
component15
from
'../../assets/scripts/scenes/BallItem'
;
registerDef
(
'./scripts/scenes/BallItem'
,
component15
);
import
component16
from
'../../assets/scripts/scenes/testC'
;
registerDef
(
'./scripts/scenes/testC'
,
component16
);
import
component17
from
'../../assets/scripts/scenes/RedFireItem'
;
registerDef
(
'./scripts/scenes/RedFireItem'
,
component17
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment