Project

General

Profile

Download (2.16 KB) Statistics
| Branch: | Revision:

distorted-objectlib / src / main / java / org / distorted / objectlib / effects / objectchange / ObjectChangeEffectNone.java @ 1eafa9c6

1
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2019 Leszek Koltunski                                                               //
3
//                                                                                               //
4
// This file is part of Magic Cube.                                                              //
5
//                                                                                               //
6
// Magic Cube is proprietary software licensed under an EULA which you should have received      //
7
// along with the code. If not, check https://distorted.org/magic/License-Magic-Cube.html        //
8
///////////////////////////////////////////////////////////////////////////////////////////////////
9

    
10
package org.distorted.objectlib.effects.objectchange;
11

    
12
import org.distorted.library.effect.Effect;
13
import org.distorted.library.effect.MatrixEffectMove;
14
import org.distorted.library.type.Dynamic3D;
15
import org.distorted.library.type.Static3D;
16

    
17
///////////////////////////////////////////////////////////////////////////////////////////////////
18

    
19
class ObjectChangeEffectNone extends ObjectChangeEffect
20
  {
21
  public int createEffectsPhase0(int duration)
22
    {
23
    mCubeEffectPosition[0] = new int[] {-1};
24
    mCubeEffects[0]        = new Effect[mCubeEffectPosition[0].length];
25

    
26
    Dynamic3D d0 = new Dynamic3D(1,0.5f);
27
    d0.add(new Static3D(0,0,0));
28
    mCubeEffects[0][0] = new MatrixEffectMove(d0);
29

    
30
    return 1;
31
    }
32

    
33
///////////////////////////////////////////////////////////////////////////////////////////////////
34

    
35
  public int createEffectsPhase1(int duration)
36
    {
37
    mCubeEffectPosition[1] = new int[] {-1};
38
    mCubeEffects[1]        = new Effect[mCubeEffectPosition[1].length];
39

    
40
    Dynamic3D d0 = new Dynamic3D(1,0.5f);
41
    d0.add(new Static3D(0,0,0));
42
    mCubeEffects[1][0] = new MatrixEffectMove(d0);
43

    
44
    return 1;
45
    }
46

    
47
///////////////////////////////////////////////////////////////////////////////////////////////////
48
// enable all effects used in this Effect (here: none).  Called by reflection from the parent class.
49

    
50
  @SuppressWarnings("unused")
51
  static void enable()
52
    {
53

    
54
    }
55
  }
(3-3/6)