Beispiel #1
0
 // Start is called before the first frame update
 private void Awake()
 {
     playerController = GameObject.Find("Player").GetComponent <PlayerController>();
     playerController.Moving(true);
     height       = GameObject.Find("Manager").GetComponent <Height>();
     waterSurface = GameObject.Find("WaterHeightController").GetComponent <WaterSurface>();
 }
Beispiel #2
0
 // Start is called before the first frame update
 void Start()
 {
     PlayerController = GameObject.Find("Player").GetComponent <PlayerController>();
     targetPosition   = gameObject.transform.position;
     step             = 0;
     waterSurface     = GameObject.Find("WaterHeightController").GetComponent <WaterSurface>();
 }
Beispiel #3
0
    private GameObject[] enemys; //なんで持ってんのw

    // Start is called before the first frame update
    void Start()
    {
        rb           = GetComponent <Rigidbody>();
        waterSurface = GameObject.Find("WaterHeightController").GetComponent <WaterSurface>();
        time         = 0;
        start        = GameObject.Find("Start");
        enemys       = GameObject.FindGameObjectsWithTag("Enemy");
    }
    private void OnEnable()
    {
        hideFlags = HideFlags.HideAndDontSave;

        if (surface == null)
        {
            surface = new WaterSurface();
        }
    }
Beispiel #5
0
    void WaterSurfaceEnter(object obj)
    {
        WaterSurface surface = obj as WaterSurface;

        if (IsHit)
        {
            Explode(true);
            surface.DoSplash(gameObject, transform.position);
        }
    }
Beispiel #6
0
    void WaterSurfaceEnter(object obj)
    {
        var velocity = _rb.velocity;

        if (velocity.magnitude > 1f)
        {
            WaterSurface surface = obj as WaterSurface;
            surface.DoSplash(gameObject, transform.position);
        }
    }
    void OnEnable()
    {
        volume       = GetComponent <PostProcessVolume>();
        watersurface = FindObjectOfType <WaterSurface>();
        ppm          = FindObjectOfType <PostProcessingManager>();

        bool foundEffectSettings = volume.profile.TryGetSettings <PreDeathEffect>(out predeatheffect);

        if (!foundEffectSettings)
        {
            enabled = false;
            Debug.Log("Cant load PreDeathEffect settings");
            return;
        }
    }
Beispiel #8
0
    // Start is called before the first frame update
    void Start()
    {
        gameObjectList = new List <GameObject>();
        GameObject[] gameObjects1;
        gameObjects1 = GameObject.FindGameObjectsWithTag("Move");
        waterSurface = GameObject.Find("WaterHeightController").GetComponent <WaterSurface>();
        foreach (GameObject obj in gameObjects1)
        {
            gameObjectList.Add(obj);
        }
        GameObject a;

        if (a = GameObject.FindGameObjectWithTag("Goal&Move"))
        {
            gameObjectList.Add(a);
        }
        else
        {
            gameObjectList.Add(GameObject.FindGameObjectWithTag("Goal"));
        }
    }
 // Use this for initialization
 void Start()
 {
     water  = FindObjectOfType <WaterSurface>();
     rb     = this.GetComponent <Rigidbody2D>();
     bodyrb = body.GetComponent <Rigidbody2D>();
 }
Beispiel #10
0
 static void DrawGizmosSelected(WaterSurface waterSurface, GizmoType gizmoType)
 {
 }
 // Use this for initialization
 void Start()
 {
     water = FindObjectOfType <WaterSurface>();
 }