mirror of
https://github.com/Steffo99/bleach-beach.git
synced 2024-12-04 19:04:19 +00:00
.
This commit is contained in:
parent
689c72c165
commit
1c5886f5de
4 changed files with 34 additions and 8 deletions
19
Assets/Scenes/Game.unity
generated
19
Assets/Scenes/Game.unity
generated
|
@ -209,7 +209,7 @@ Transform:
|
|||
m_GameObject: {fileID: 671812156}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: -5, z: 0}
|
||||
m_LocalScale: {x: 100, y: 20, z: 1}
|
||||
m_LocalScale: {x: 100, y: 40, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
|
@ -223,6 +223,7 @@ GameObject:
|
|||
m_Component:
|
||||
- component: {fileID: 749934309}
|
||||
- component: {fileID: 749934308}
|
||||
- component: {fileID: 749934310}
|
||||
m_Layer: 0
|
||||
m_Name: Ship
|
||||
m_TagString: Untagged
|
||||
|
@ -257,7 +258,7 @@ Transform:
|
|||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 749934307}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -0.64, y: 21.16, z: 0}
|
||||
m_LocalPosition: {x: 1.59, y: 38.77, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 1825259613}
|
||||
|
@ -267,6 +268,20 @@ Transform:
|
|||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &749934310
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 749934307}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 91d88e1722c056f47a710df9123b44a9, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
rigidbody: {fileID: 0}
|
||||
horizontalShipSpeed: 35
|
||||
verticalShipSpeed: 35
|
||||
--- !u!1 &1284746814
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
11
Assets/Scripts/PlayerMovement.cs.meta
generated
Normal file
11
Assets/Scripts/PlayerMovement.cs.meta
generated
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 91d88e1722c056f47a710df9123b44a9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -2,17 +2,17 @@
|
|||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Marea : MonoBehaviour {
|
||||
public BuoyancyEffector2D buoyancyEffector2D;
|
||||
float speed = 0.01f;
|
||||
// Use this for initialization
|
||||
public class Tide : MonoBehaviour {
|
||||
|
||||
private BuoyancyEffector2D buoyancyEffector2D;
|
||||
public float speed = 0.01f;
|
||||
|
||||
void Start () {
|
||||
buoyancyEffector2D = GetComponent<BuoyancyEffector2D>();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update () {
|
||||
if(buoyancyEffector2D.surfaceLevel>0)
|
||||
if(buoyancyEffector2D.surfaceLevel > 0)
|
||||
{
|
||||
buoyancyEffector2D.surfaceLevel = buoyancyEffector2D.surfaceLevel - (Time.deltaTime * speed);
|
||||
}
|
Loading…
Reference in a new issue